public class LogBuffer extends Object
| 限定符和类型 | 字段和说明 |
|---|---|
static BigInteger |
BIGINT_MAX_VALUE |
protected byte[] |
buffer |
static int |
DIG_BASE |
static int |
DIG_MAX |
static int |
DIG_PER_DEC1 |
static int |
DIG_PER_INT32 |
static int[] |
dig2bytes |
static String |
ISO_8859_1 |
protected int |
limit |
static long |
NULL_LENGTH |
protected int |
origin |
protected int |
position |
static int[] |
powers10 |
static int |
SIZE_OF_INT32 |
| 限定符和类型 | 方法和说明 |
|---|---|
int |
capacity()
Returns this buffer's capacity.
|
LogBuffer |
consume(int len)
Consume this buffer, moving origin and position.
|
LogBuffer |
duplicate()
Return next n bytes in this buffer.
|
LogBuffer |
duplicate(int len)
Return next n bytes in this buffer.
|
LogBuffer |
duplicate(int pos,
int len)
Return n bytes in this buffer.
|
void |
fillBitmap(BitSet bitmap,
int len) |
void |
fillBitmap(BitSet bitmap,
int pos,
int len) |
void |
fillBytes(byte[] dest,
int destPos,
int len)
Fill next n bytes in this buffer.
|
void |
fillBytes(int pos,
byte[] dest,
int destPos,
int len) |
void |
fillOutput(OutputStream out,
int len) |
void |
fillOutput(OutputStream out,
int pos,
int len) |
LogBuffer |
forward(int len)
Forwards this buffer's position.
|
int |
getBeInt16() |
int |
getBeInt16(int pos) |
int |
getBeInt24() |
int |
getBeInt24(int pos) |
int |
getBeInt32() |
int |
getBeInt32(int pos) |
long |
getBeLong48() |
long |
getBeLong48(int pos) |
long |
getBeLong64() |
long |
getBeLong64(int pos) |
int |
getBeUint16() |
int |
getBeUint16(int pos) |
int |
getBeUint24() |
int |
getBeUint24(int pos) |
long |
getBeUint32() |
long |
getBeUint32(int pos) |
long |
getBeUlong40() |
long |
getBeUlong40(int pos) |
long |
getBeUlong48() |
long |
getBeUlong48(int pos) |
long |
getBeUlong56() |
long |
getBeUlong56(int pos) |
BigInteger |
getBeUlong64() |
BigInteger |
getBeUlong64(int pos) |
BitSet |
getBitmap(int len) |
BitSet |
getBitmap(int pos,
int len) |
byte[] |
getData()
Return all remaining data from buffer.
|
byte[] |
getData(int len)
Return next n-byte data from buffer.
|
byte[] |
getData(int pos,
int len)
Return n-byte data from buffer.
|
BigDecimal |
getDecimal(int precision,
int scale) |
BigDecimal |
getDecimal(int pos,
int precision,
int scale) |
double |
getDouble64() |
double |
getDouble64(int pos) |
String |
getFixString(int len) |
String |
getFixString(int pos,
int len) |
String |
getFixString(int pos,
int len,
String charsetName) |
String |
getFixString(int len,
String charsetName) |
float |
getFloat32() |
float |
getFloat32(int pos) |
String |
getFullString(int pos,
int len,
String charsetName) |
String |
getFullString(int len,
String charsetName) |
int |
getInt16() |
int |
getInt16(int pos) |
int |
getInt24() |
int |
getInt24(int pos) |
int |
getInt32() |
int |
getInt32(int pos) |
int |
getInt8()
Return next 8-bit signed int from buffer.
|
int |
getInt8(int pos)
Return 8-bit signed int from buffer.
|
long |
getLong48() |
long |
getLong48(int pos) |
long |
getLong64() |
long |
getLong64(int pos) |
long |
getPackedLong() |
long |
getPackedLong(int pos) |
String |
getString()
Return next dynamic length string from buffer.
|
String |
getString(int pos)
Return dynamic length string from buffer.
|
String |
getString(int pos,
String charsetName)
Return dynamic length string from buffer.
|
String |
getString(String charsetName)
Return next dynamic length string from buffer.
|
int |
getUint16() |
int |
getUint16(int pos) |
int |
getUint24() |
int |
getUint24(int pos) |
long |
getUint32() |
long |
getUint32(int pos) |
int |
getUint8()
Return next 8-bit unsigned int from buffer.
|
int |
getUint8(int pos)
Return 8-bit unsigned int from buffer.
|
long |
getUlong40() |
long |
getUlong40(int pos) |
long |
getUlong48() |
long |
getUlong48(int pos) |
long |
getUlong56() |
long |
getUlong56(int pos) |
BigInteger |
getUlong64() |
BigInteger |
getUlong64(int pos) |
boolean |
hasRemaining()
Tells whether there are any elements between the current position and the
limit.
|
String |
hexdump(int pos)
Return full hexdump from position.
|
String |
hexdump(int pos,
int len)
Return hexdump from position, for len bytes.
|
int |
limit()
Returns this buffer's limit.
|
LogBuffer |
limit(int newLimit)
Sets this buffer's limit.
|
int |
position()
Returns this buffer's position.
|
LogBuffer |
position(int newPosition)
Sets this buffer's position.
|
int |
remaining()
Returns the number of elements between the current position and the
limit.
|
LogBuffer |
rewind()
Rewinds this buffer.
|
protected byte[] buffer
protected int origin
protected int limit
protected int position
public static final BigInteger BIGINT_MAX_VALUE
public static final long NULL_LENGTH
public static final int DIG_PER_DEC1
public static final int DIG_BASE
public static final int DIG_MAX
public static final int[] dig2bytes
public static final int[] powers10
public static final int DIG_PER_INT32
public static final int SIZE_OF_INT32
protected LogBuffer()
public LogBuffer(byte[] buffer,
int origin,
int limit)
public final LogBuffer duplicate(int pos, int len)
public final LogBuffer duplicate(int len)
public final LogBuffer duplicate()
public final int capacity()
public final int position()
public final LogBuffer position(int newPosition)
newPosition - The new position value; must be non-negative and no
larger than the current limitIllegalArgumentException - If the preconditions on
newPosition do not holdpublic final LogBuffer forward(int len)
len - The forward distancepublic final LogBuffer consume(int len)
len - The consume distancepublic final LogBuffer rewind()
public final int limit()
public final LogBuffer limit(int newLimit)
newLimit - The new limit value; must be non-negative and no larger
than this buffer's capacityIllegalArgumentException - If the preconditions on newLimit
do not holdpublic final int remaining()
public final boolean hasRemaining()
public final int getInt8(int pos)
public final int getInt8()
public final int getUint8(int pos)
public final int getUint8()
public final int getInt16(int pos)
public final int getInt16()
public final int getUint16(int pos)
public final int getUint16()
public final int getBeInt16(int pos)
public final int getBeInt16()
public final int getBeUint16(int pos)
public final int getBeUint16()
public final int getInt24(int pos)
public final int getInt24()
public final int getBeInt24(int pos)
public final int getBeInt24()
public final int getUint24(int pos)
public final int getUint24()
public final int getBeUint24(int pos)
public final int getBeUint24()
public final int getInt32(int pos)
public final int getBeInt32(int pos)
public final int getInt32()
public final int getBeInt32()
public final long getUint32(int pos)
public final long getBeUint32(int pos)
public final long getUint32()
public final long getBeUint32()
public final long getUlong40(int pos)
public final long getUlong40()
public final long getBeUlong40(int pos)
public final long getBeUlong40()
public final long getLong48(int pos)
public final long getBeLong48(int pos)
public final long getLong48()
public final long getBeLong48()
public final long getUlong48(int pos)
public final long getBeUlong48(int pos)
public final long getUlong48()
public final long getBeUlong48()
public final long getUlong56(int pos)
public final long getUlong56()
public final long getBeUlong56(int pos)
public final long getBeUlong56()
public final long getLong64(int pos)
public final long getBeLong64(int pos)
public final long getLong64()
public final long getBeLong64()
public final BigInteger getUlong64(int pos)
public final BigInteger getBeUlong64(int pos)
public final BigInteger getUlong64()
public final BigInteger getBeUlong64()
public final float getFloat32(int pos)
public final float getFloat32()
public final double getDouble64(int pos)
public final double getDouble64()
public final long getPackedLong(int pos)
public final long getPackedLong()
public final String getFixString(int pos, int len)
public final String getFixString(int len)
public final String getString(int pos)
public final String getString()
public final String getString(int pos, String charsetName)
public final String getString(String charsetName)
public final BigDecimal getDecimal(int pos, int precision, int scale)
public final BigDecimal getDecimal(int precision, int scale)
public final void fillBitmap(BitSet bitmap, int pos, int len)
public final void fillBitmap(BitSet bitmap, int len)
public final BitSet getBitmap(int pos, int len)
public final BitSet getBitmap(int len)
public final void fillOutput(OutputStream out, int pos, int len) throws IOException
IOExceptionpublic final void fillOutput(OutputStream out, int len) throws IOException
IOExceptionpublic final void fillBytes(int pos,
byte[] dest,
int destPos,
int len)
public final void fillBytes(byte[] dest,
int destPos,
int len)
public final byte[] getData(int pos,
int len)
public final byte[] getData(int len)
public final byte[] getData()
public final String hexdump(int pos)
public final String hexdump(int pos, int len)
Copyright © 2017. All rights reserved.