public class Field extends Object
Modifier and Type | Field and Description |
---|---|
protected byte[] |
buffer |
protected int |
length |
protected int |
offset |
Constructor and Description |
---|
Field(byte[] bytes)
ByteSegment constructor comment.
|
Field(byte[] bytes,
int length)
ByteSegment constructor comment.
|
Field(byte[] bytes,
int offset,
int length)
ByteSegment constructor comment.
|
Field(int length)
Creates a new field containing an empty buffer of the given length.
|
Modifier and Type | Method and Description |
---|---|
byte[] |
buffer() |
Field |
buffer(byte[] buffer) |
Field |
clear() |
protected static void |
clear(byte[] buffer,
int offset,
int length) |
Field |
clear(int length) |
Field |
clear(int offset,
int length) |
protected static int |
compare(byte[] buffer1,
int offset1,
int length1,
byte[] buffer2,
int offset2,
int length2) |
static int |
compare(Field f1,
Field f2) |
Field |
copy(int fromOffset,
int toOffset,
int length) |
Field |
dec(int n) |
byte[] |
get() |
byte[] |
get(int offset,
int length) |
Field |
getField(int offset,
int length) |
int |
getInt1() |
int |
getInt1(int offset) |
int |
getInt2() |
int |
getInt2(int offset) |
int |
getInt3() |
int |
getInt3(int offset) |
int |
getInt4() |
int |
getInt4(int offset) |
int |
getUInt1() |
int |
getUInt1(int offset) |
int |
getUInt2() |
int |
getUInt2(int offset) |
int |
getUInt3() |
int |
getUInt3(int offset) |
char[] |
getUTF(int offset) |
Field |
inc(int n) |
int |
length() |
Field |
length(int length) |
int |
offset()
Returns the offset into the underlying byte array that this field is defined over.
|
Field |
offset(int offset) |
Field |
pointTo(int offset) |
Field |
put(byte[] b) |
Field |
put(Field f) |
Field |
put(int offset,
byte[] b) |
Field |
put(int offset,
Field f) |
Field |
putInt1(int n) |
Field |
putInt1(int offset,
int n) |
Field |
putInt2(int n) |
Field |
putInt2(int offset,
int n) |
Field |
putInt3(int n) |
Field |
putInt3(int offset,
int n) |
Field |
putInt4(int n) |
Field |
putInt4(int offset,
int n) |
int |
putUTF(int offset,
char[] str) |
public Field(byte[] bytes)
public Field(byte[] bytes, int length)
public Field(byte[] bytes, int offset, int length)
public Field(int length)
public byte[] buffer()
public Field buffer(byte[] buffer)
public Field clear()
protected static void clear(byte[] buffer, int offset, int length)
public Field clear(int length)
public Field clear(int offset, int length)
protected static int compare(byte[] buffer1, int offset1, int length1, byte[] buffer2, int offset2, int length2)
public Field copy(int fromOffset, int toOffset, int length)
public Field dec(int n)
public byte[] get()
public byte[] get(int offset, int length)
public Field getField(int offset, int length)
public int getInt1()
public int getInt1(int offset)
public int getInt2()
public int getInt2(int offset)
public int getInt3()
public int getInt3(int offset)
public int getInt4()
public int getInt4(int offset)
public int getUInt1()
public int getUInt1(int offset)
public int getUInt2()
public int getUInt2(int offset)
public int getUInt3()
public int getUInt3(int offset)
public char[] getUTF(int offset) throws UTFDataFormatException
UTFDataFormatException
public Field inc(int n)
public int length()
public Field length(int length)
public int offset()
public Field offset(int offset)
public Field pointTo(int offset)
public Field put(byte[] b)
public Field put(int offset, byte[] b)
public Field putInt1(int n)
public Field putInt1(int offset, int n)
public Field putInt2(int n)
public Field putInt2(int offset, int n)
public Field putInt3(int n)
public Field putInt3(int offset, int n)
public Field putInt4(int n)
public Field putInt4(int offset, int n)
public int putUTF(int offset, char[] str)
Copyright © 2019. All rights reserved.