Package com.mapr.utils
Class ByteReader
java.lang.Object
com.mapr.utils.ByteReader
- Direct Known Subclasses:
ByteArrayReader,ByteBufferReader
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionabstract byte[]copyOfRange(int from, int to) Doesn't affect the cursor value of the objectabstract bytegetByte(int idx) intgetInt(int idx) protected intgetIntB(int idx) protected intgetIntL(int idx) longgetLong(int idx) protected longgetLongB(int idx) protected longgetLongL(int idx) getOrder()abstract intlength()protected intmakeInt(byte b3, byte b2, byte b1, byte b0) protected longmakeLong(byte b7, byte b6, byte b5, byte b4, byte b3, byte b2, byte b1, byte b0) abstract ByteReadermark()abstract byteabstract ByteReaderreset()static ByteReaderwrap(byte[] buff) static ByteReaderwrap(byte[] buff, int offset, int length) static ByteReaderwrap(ByteBuffer buff)
-
Constructor Details
-
ByteReader
public ByteReader()
-
-
Method Details
-
wrap
-
wrap
-
wrap
-
getOrder
-
setOrder
-
length
public abstract int length() -
nextUnsafe
public abstract byte nextUnsafe() -
getByte
public abstract byte getByte(int idx) -
mark
-
reset
-
copyOfRange
public abstract byte[] copyOfRange(int from, int to) Doesn't affect the cursor value of the object -
getInt
public int getInt(int idx) -
getLong
public long getLong(int idx) -
getIntL
protected int getIntL(int idx) -
getIntB
protected int getIntB(int idx) -
makeInt
protected int makeInt(byte b3, byte b2, byte b1, byte b0) -
getLongL
protected long getLongL(int idx) -
getLongB
protected long getLongB(int idx) -
makeLong
protected long makeLong(byte b7, byte b6, byte b5, byte b4, byte b3, byte b2, byte b1, byte b0)
-