public class RlpDecoder
extends java.lang.Object
For the specification, refer to p16 of the yellow paper and here.
Modifier and Type | Field and Description |
---|---|
static int |
OFFSET_LONG_LIST
[0xf7] If the total payload of a list is more than 55 bytes long, the RLP encoding consists
of a single byte with value 0xf7 plus the length of the length of the list in binary form,
followed by the length of the list, followed by the concatenation of the RLP encodings of the
items.
|
static int |
OFFSET_LONG_STRING
[0xb7] If a string is more than 55 bytes long, the RLP encoding consists of a single byte
with value 0xb7 plus the length of the length of the string in binary form, followed by the
length of the string, followed by the string.
|
static int |
OFFSET_SHORT_LIST
[0xc0] If the total payload of a list (i.e.
|
static int |
OFFSET_SHORT_STRING
[0x80] If a string is 0-55 bytes long, the RLP encoding consists of a single byte with value
0x80 plus the length of the string followed by the string.
|
Constructor and Description |
---|
RlpDecoder() |
Modifier and Type | Method and Description |
---|---|
static RlpList |
decode(byte[] rlpEncoded)
Parse wire byte[] message into RLP elements.
|
public static int OFFSET_SHORT_STRING
public static int OFFSET_LONG_STRING
public static int OFFSET_SHORT_LIST
public static int OFFSET_LONG_LIST
public static RlpList decode(byte[] rlpEncoded)
rlpEncoded
- - RLP encoded byte-array