public class BencodedString extends AbstractBencodedValue
| Constructor and Description |
|---|
BencodedString(byte[] value)
Creates a new bencoded string based on the given value.
|
BencodedString(String value)
Creates a new bencoded string based on the given value.
|
| Modifier and Type | Method and Description |
|---|---|
byte[] |
asBytes() |
String |
asString() |
String |
serialize() |
String |
toString() |
asBigInteger, asList, asLong, asMappublic BencodedString(String value)
value - The string to bencode.public BencodedString(byte[] value)
value - The string to bencode.public String asString()
asString in interface IBencodedValueasString in class AbstractBencodedValuepublic byte[] asBytes()
asBytes in interface IBencodedValueasBytes in class AbstractBencodedValuepublic String serialize()
Copyright © 2016. All rights reserved.