public class BencodedInteger extends AbstractBencodedValue
| Constructor and Description |
|---|
BencodedInteger(BigInteger bigInteger)
Creates a new bencoded integer.
|
BencodedInteger(long integerValue)
Creates a new bencoded long.
|
| Modifier and Type | Method and Description |
|---|---|
BigInteger |
asBigInteger() |
long |
asLong() |
boolean |
equals(Object o) |
int |
hashCode() |
String |
serialize() |
String |
toString() |
asList, asMap, asStringpublic BencodedInteger(long integerValue)
integerValue - The long to bencode.public BencodedInteger(BigInteger bigInteger)
bigInteger - The integer to bencode.public long asLong()
asLong in interface IBencodedValueasLong in class AbstractBencodedValuepublic BigInteger asBigInteger()
asBigInteger in interface IBencodedValueasBigInteger in class AbstractBencodedValuepublic String serialize()
Copyright © 2016. All rights reserved.