|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.google.bitcoin.core.VarInt
public class VarInt
A variable-length encoded integer using Satoshis encoding.
| Field Summary | |
|---|---|
long |
value
|
| Constructor Summary | |
|---|---|
VarInt(byte[] buf,
int offset)
|
|
VarInt(long value)
|
|
| Method Summary | |
|---|---|
byte[] |
encode()
|
int |
getOriginalSizeInBytes()
Gets the number of bytes used to encode this originally if deserialized from a byte array. |
int |
getSizeInBytes()
Gets the minimum encoded size of the value stored in this VarInt |
static int |
sizeOf(int value)
Gets the minimum encoded size of the given value. |
static int |
sizeOf(long value)
Gets the minimum encoded size of the given value. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public final long value
| Constructor Detail |
|---|
public VarInt(long value)
public VarInt(byte[] buf,
int offset)
| Method Detail |
|---|
public int getOriginalSizeInBytes()
public int getSizeInBytes()
public static int sizeOf(int value)
public static int sizeOf(long value)
public byte[] encode()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||