public class BEncoder extends Object
Constructor and Description |
---|
BEncoder() |
Modifier and Type | Method and Description |
---|---|
static void |
bencode(byte[] bs,
OutputStream out) |
static void |
bencode(List<?> l,
OutputStream out) |
static byte[] |
bencode(Map<?,?> m)
Keys must be Strings or (supported as of 0.9.31) byte[]s
A mix in the same Map is not supported.
|
static void |
bencode(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.
|
static void |
bencode(Number n,
OutputStream out) |
static void |
bencode(Object o,
OutputStream out) |
static void |
bencode(String s,
OutputStream out) |
public static void bencode(Object o, OutputStream out) throws IOException, IllegalArgumentException
IOException
IllegalArgumentException
public static void bencode(String s, OutputStream out) throws IOException
IOException
public static void bencode(Number n, OutputStream out) throws IOException
IOException
public static void bencode(List<?> l, OutputStream out) throws IOException
IOException
public static void bencode(byte[] bs, OutputStream out) throws IOException
IOException
public static byte[] bencode(Map<?,?> m)
IllegalArgumentException
- if keys are not all Strings or all byte[]spublic static void bencode(Map<?,?> m, OutputStream out) throws IOException, IllegalArgumentException
IllegalArgumentException
- if keys are not all Strings or all byte[]sIOException