Package org.klomp.snark.bencode
Class BEncoder
java.lang.Object
org.klomp.snark.bencode.BEncoder
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voidbencode(byte[] bs, OutputStream out) static voidbencode(Number n, OutputStream out) static voidbencode(Object o, OutputStream out) static voidbencode(String s, OutputStream out) static voidbencode(List<?> l, OutputStream out) static byte[]Keys must be Strings or (supported as of 0.9.31) byte[]s A mix in the same Map is not supported.static voidbencode(Map<?, ?> m, OutputStream out) Keys must be Strings or (supported as of 0.9.31) byte[]s A mix in the same Map is not supported.
-
Constructor Details
-
BEncoder
public BEncoder()
-
-
Method Details
-
bencode
- Throws:
IOExceptionIllegalArgumentException
-
bencode
- Throws:
IOException
-
bencode
- Throws:
IOException
-
bencode
- Throws:
IOException
-
bencode
- Throws:
IOException
-
bencode
Keys must be Strings or (supported as of 0.9.31) byte[]s A mix in the same Map is not supported.- Throws:
IllegalArgumentException- if keys are not all Strings or all byte[]s
-
bencode
public static void bencode(Map<?, ?> m, OutputStream out) throws IOException, IllegalArgumentExceptionKeys must be Strings or (supported as of 0.9.31) byte[]s A mix in the same Map is not supported.- Throws:
IllegalArgumentException- if keys are not all Strings or all byte[]sIOException
-