public class LogBuffer
extends java.lang.Object
| 限定符和类型 | 字段和说明 |
|---|---|
static java.math.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 java.lang.String |
ISO_8859_1 |
protected int |
limit |
static long |
NULL_LENGTH |
protected int |
origin |
protected int |
position |
static int[] |
powers10 |
protected int |
semival |
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(java.util.BitSet bitmap,
int len)
Fill next MY_BITMAP structure from buffer.
|
void |
fillBitmap(java.util.BitSet bitmap,
int pos,
int len)
Fill MY_BITMAP structure from buffer.
|
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)
Fill n bytes in this buffer.
|
void |
fillOutput(java.io.OutputStream out,
int len)
Fill next n bytes into output stream.
|
void |
fillOutput(java.io.OutputStream out,
int pos,
int len)
Fill n bytes into output stream.
|
LogBuffer |
forward(int len)
Forwards this buffer's position.
|
int |
getBeInt16()
Return next 16-bit signed int from buffer.
|
int |
getBeInt16(int pos)
Return 16-bit signed int from buffer.
|
int |
getBeInt24()
Return next 24-bit signed int from buffer.
|
int |
getBeInt24(int pos)
Return 24-bit signed int from buffer.
|
int |
getBeInt32()
Return next 32-bit signed int from buffer.
|
int |
getBeInt32(int pos)
Return 32-bit signed int from buffer.
|
long |
getBeLong48()
Return next 48-bit signed long from buffer.
|
long |
getBeLong48(int pos)
Return 48-bit signed long from buffer.
|
long |
getBeLong64()
Return next 64-bit signed long from buffer.
|
long |
getBeLong64(int pos)
Return 64-bit signed long from buffer.
|
int |
getBeUint16()
Return next 16-bit unsigned int from buffer.
|
int |
getBeUint16(int pos)
Return 16-bit unsigned int from buffer.
|
int |
getBeUint24()
Return next 24-bit unsigned int from buffer.
|
int |
getBeUint24(int pos)
Return 24-bit unsigned int from buffer.
|
long |
getBeUint32()
Return next 32-bit unsigned int from buffer.
|
long |
getBeUint32(int pos)
Return 32-bit unsigned int from buffer.
|
long |
getBeUlong40()
Return next 40-bit unsigned int from buffer.
|
long |
getBeUlong40(int pos)
Return 40-bit unsigned int from buffer.
|
long |
getBeUlong48()
Return next 48-bit unsigned long from buffer.
|
long |
getBeUlong48(int pos)
Return 48-bit unsigned long from buffer.
|
long |
getBeUlong56()
Return next 56-bit unsigned int from buffer.
|
long |
getBeUlong56(int pos)
Return 56-bit unsigned int from buffer.
|
java.math.BigInteger |
getBeUlong64()
Return next 64-bit unsigned long from buffer.
|
java.math.BigInteger |
getBeUlong64(int pos)
Return 64-bit unsigned long from buffer.
|
java.util.BitSet |
getBitmap(int len)
Return next MY_BITMAP structure from buffer.
|
java.util.BitSet |
getBitmap(int pos,
int len)
Return MY_BITMAP structure from buffer.
|
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.
|
java.math.BigDecimal |
getDecimal(int precision,
int scale)
Return next big decimal from buffer.
|
java.math.BigDecimal |
getDecimal(int pos,
int precision,
int scale)
Return big decimal from buffer.
|
double |
getDouble64()
Return next 64-bit double from buffer.
|
double |
getDouble64(int pos)
Return 64-bit double from buffer.
|
java.lang.String |
getFixString(int len)
Return next fix length string from buffer.
|
java.lang.String |
getFixString(int pos,
int len)
Return fix length string from buffer.
|
java.lang.String |
getFixString(int pos,
int len,
java.lang.String charsetName)
Return fix length string from buffer.
|
java.lang.String |
getFixString(int len,
java.lang.String charsetName)
Return next fix length string from buffer.
|
float |
getFloat32()
Return next 32-bit float from buffer.
|
float |
getFloat32(int pos)
Return 32-bit float from buffer.
|
java.lang.String |
getFullString(int pos,
int len,
java.lang.String charsetName)
Return fix-length string from buffer without null-terminate checking.
|
java.lang.String |
getFullString(int len,
java.lang.String charsetName)
Return next fix-length string from buffer without null-terminate
checking.
|
int |
getInt16()
Return next 16-bit signed int from buffer.
|
int |
getInt16(int pos)
Return 16-bit signed int from buffer.
|
int |
getInt24()
Return next 24-bit signed int from buffer.
|
int |
getInt24(int pos)
Return 24-bit signed int from buffer.
|
int |
getInt32()
Return next 32-bit signed int from buffer.
|
int |
getInt32(int pos)
Return 32-bit signed int from buffer.
|
int |
getInt8()
Return next 8-bit signed int from buffer.
|
int |
getInt8(int pos)
Return 8-bit signed int from buffer.
|
long |
getLong48()
Return next 48-bit signed long from buffer.
|
long |
getLong48(int pos)
Return 48-bit signed long from buffer.
|
long |
getLong64()
Return next 64-bit signed long from buffer.
|
long |
getLong64(int pos)
Return 64-bit signed long from buffer.
|
long |
getPackedLong()
Return next packed number from buffer.
|
long |
getPackedLong(int pos)
Return packed number from buffer.
|
java.lang.String |
getString()
Return next dynamic length string from buffer.
|
java.lang.String |
getString(int pos)
Return dynamic length string from buffer.
|
java.lang.String |
getString(int pos,
java.lang.String charsetName)
Return dynamic length string from buffer.
|
java.lang.String |
getString(java.lang.String charsetName)
Return next dynamic length string from buffer.
|
int |
getUint16()
Return next 16-bit unsigned int from buffer.
|
int |
getUint16(int pos)
Return 16-bit unsigned int from buffer.
|
int |
getUint24()
Return next 24-bit unsigned int from buffer.
|
int |
getUint24(int pos)
Return 24-bit unsigned int from buffer.
|
long |
getUint32()
Return next 32-bit unsigned int from buffer.
|
long |
getUint32(int pos)
Return 32-bit unsigned int from buffer.
|
int |
getUint8()
Return next 8-bit unsigned int from buffer.
|
int |
getUint8(int pos)
Return 8-bit unsigned int from buffer.
|
long |
getUlong40()
Return next 40-bit unsigned int from buffer.
|
long |
getUlong40(int pos)
Return 40-bit unsigned int from buffer.
|
long |
getUlong48()
Return next 48-bit unsigned long from buffer.
|
long |
getUlong48(int pos)
Return 48-bit unsigned long from buffer.
|
long |
getUlong56()
Return next 56-bit unsigned int from buffer.
|
long |
getUlong56(int pos)
Return 56-bit unsigned int from buffer.
|
java.math.BigInteger |
getUlong64()
Return next 64-bit unsigned long from buffer.
|
java.math.BigInteger |
getUlong64(int pos)
Return 64-bit unsigned long from buffer.
|
boolean |
hasRemaining()
Tells whether there are any elements between the current position and the
limit.
|
java.lang.String |
hexdump(int pos)
Return full hexdump from position.
|
java.lang.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
protected int semival
public static final java.math.BigInteger BIGINT_MAX_VALUE
public static final long NULL_LENGTH
public static final java.lang.String ISO_8859_1
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 limitjava.lang.IllegalArgumentException - 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 capacityjava.lang.IllegalArgumentException - 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)
- sint2korrpublic final int getInt16()
- sint2korrpublic final int getUint16(int pos)
- uint2korrpublic final int getUint16()
- uint2korrpublic final int getBeInt16(int pos)
- mi_sint2korrpublic final int getBeInt16()
- mi_sint2korrpublic final int getBeUint16(int pos)
- mi_usint2korrpublic final int getBeUint16()
- mi_usint2korrpublic final int getInt24(int pos)
- sint3korrpublic final int getInt24()
- sint3korrpublic final int getBeInt24(int pos)
- mi_usint3korrpublic final int getBeInt24()
- mi_usint3korrpublic final int getUint24(int pos)
- uint3korrpublic final int getUint24()
- uint3korrpublic final int getBeUint24(int pos)
- mi_usint3korrpublic final int getBeUint24()
- mi_usint3korrpublic final int getInt32(int pos)
- sint4korrpublic final int getBeInt32(int pos)
- mi_sint4korrpublic final int getInt32()
- sint4korrpublic final int getBeInt32()
- mi_sint4korrpublic final long getUint32(int pos)
- uint4korrpublic final long getBeUint32(int pos)
- mi_usint4korrpublic final long getUint32()
- uint4korrpublic final long getBeUint32()
- mi_uint4korrpublic final long getUlong40(int pos)
public final long getUlong40()
public final long getBeUlong40(int pos)
- mi_uint5korrpublic final long getBeUlong40()
- mi_uint5korrpublic final long getLong48(int pos)
- sint6korrpublic final long getBeLong48(int pos)
- mi_sint6korrpublic final long getLong48()
- sint6korrpublic final long getBeLong48()
- mi_sint6korrpublic final long getUlong48(int pos)
- uint6korrpublic final long getBeUlong48(int pos)
- mi_uint6korrpublic final long getUlong48()
- uint6korrpublic final long getBeUlong48()
- mi_uint6korrpublic 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)
- sint8korrpublic final long getBeLong64(int pos)
- mi_sint8korrpublic final long getLong64()
- sint8korrpublic final long getBeLong64()
- mi_sint8korrpublic final java.math.BigInteger getUlong64(int pos)
- uint8korrpublic final java.math.BigInteger getBeUlong64(int pos)
- mi_uint8korrpublic final java.math.BigInteger getUlong64()
- uint8korrpublic final java.math.BigInteger getBeUlong64()
- mi_uint8korrpublic final float getFloat32(int pos)
- float4getpublic final float getFloat32()
- float4getpublic final double getDouble64(int pos)
- float8getpublic final double getDouble64()
- float8getpublic final long getPackedLong(int pos)
public final long getPackedLong()
getPackedLong(int)public final java.lang.String getFixString(int pos,
int len)
public final java.lang.String getFixString(int len)
public final java.lang.String getFixString(int pos,
int len,
java.lang.String charsetName)
public final java.lang.String getFixString(int len,
java.lang.String charsetName)
public final java.lang.String getFullString(int pos,
int len,
java.lang.String charsetName)
https://github.com/AlibabaTech/canal/issues/17 public final java.lang.String getFullString(int len,
java.lang.String charsetName)
://github.com/AlibabaTech/canal/issues/17 public final java.lang.String getString(int pos)
public final java.lang.String getString()
public final java.lang.String getString(int pos,
java.lang.String charsetName)
public final java.lang.String getString(java.lang.String charsetName)
public final java.math.BigDecimal getDecimal(int pos,
int precision,
int scale)
- bin2decimal()public final java.math.BigDecimal getDecimal(int precision,
int scale)
- bin2decimal()public final void fillBitmap(java.util.BitSet bitmap,
int pos,
int len)
len - The length of MY_BITMAP in bits.public final void fillBitmap(java.util.BitSet bitmap,
int len)
len - The length of MY_BITMAP in bits.public final java.util.BitSet getBitmap(int pos,
int len)
len - The length of MY_BITMAP in bits.public final java.util.BitSet getBitmap(int len)
len - The length of MY_BITMAP in bits.public final void fillOutput(java.io.OutputStream out,
int pos,
int len)
throws java.io.IOException
java.io.IOExceptionpublic final void fillOutput(java.io.OutputStream out,
int len)
throws java.io.IOException
java.io.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 java.lang.String hexdump(int pos)
public final java.lang.String hexdump(int pos,
int len)
Copyright © 2019. All rights reserved.