public class BEncoder extends Object
| Constructor | Description |
|---|---|
BEncoder() |
| Modifier and Type | Method | Description |
|---|---|---|
static byte[] |
bencode(byte[] bs) |
|
static void |
bencode(byte[] bs,
OutputStream out) |
|
static byte[] |
bencode(Number n) |
|
static void |
bencode(Number n,
OutputStream out) |
|
static byte[] |
bencode(Object o) |
|
static void |
bencode(Object o,
OutputStream out) |
|
static byte[] |
bencode(String s) |
|
static void |
bencode(String s,
OutputStream out) |
|
static byte[] |
bencode(List<?> l) |
|
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.
|
public static byte[] bencode(Object o) throws IllegalArgumentException
IllegalArgumentExceptionpublic static void bencode(Object o, OutputStream out) throws IOException, IllegalArgumentException
IOExceptionIllegalArgumentExceptionpublic static byte[] bencode(String s)
public static void bencode(String s, OutputStream out) throws IOException
IOExceptionpublic static byte[] bencode(Number n)
public static void bencode(Number n, OutputStream out) throws IOException
IOExceptionpublic static byte[] bencode(List<?> l)
public static void bencode(List<?> l, OutputStream out) throws IOException
IOExceptionpublic static byte[] bencode(byte[] bs)
public static void bencode(byte[] bs,
OutputStream out)
throws IOException
IOExceptionpublic 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