Class BinaryBuilderReader
- java.lang.Object
-
- org.apache.ignite.internal.binary.builder.BinaryBuilderReader
-
- All Implemented Interfaces:
BinaryPositionReadable
public class BinaryBuilderReader extends Object implements BinaryPositionReadable
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description byte[]array()BinaryContextbinaryContext()ObjectgetValueQuickly(int pos, int len)ObjectparseValue()intposition()voidposition(int pos)booleanreadBoolean()bytereadByte()bytereadByte(int off)bytereadBytePositioned(int pos)Read byte at the given position.intreadInt()intreadInt(int off)intreadIntPositioned(int pos)Read integer at the given position.intreadLength()shortreadShortPositioned(int pos)Read short at the given position.StringreadString()Reads string.intreadStringLength()Read string length.voidregisterObject(BinaryObjectBuilderImpl obj)BinarySchemaschema()Get schema of the object, starting at the given position.voidskip(int n)voidskipValue()
-
-
-
Method Detail
-
binaryContext
public BinaryContext binaryContext()
- Returns:
- Binary context.
-
registerObject
public void registerObject(BinaryObjectBuilderImpl obj)
- Parameters:
obj- Mutable binary object.
-
schema
public BinarySchema schema()
Get schema of the object, starting at the given position.- Returns:
- Object's schema.
-
readInt
public int readInt()
- Returns:
- Read int value.
-
readByte
public byte readByte()
- Returns:
- Read int value.
-
readBoolean
public boolean readBoolean()
- Returns:
- Read boolean value.
-
readByte
public byte readByte(int off)
- Returns:
- Read int value.
-
readInt
public int readInt(int off)
- Parameters:
off- Offset related topos- Returns:
- Read int value.
-
readBytePositioned
public byte readBytePositioned(int pos)
Description copied from interface:BinaryPositionReadableRead byte at the given position.- Specified by:
readBytePositionedin interfaceBinaryPositionReadable- Parameters:
pos- Position in the source array.- Returns:
- Read byte value.
-
readShortPositioned
public short readShortPositioned(int pos)
Read short at the given position.- Specified by:
readShortPositionedin interfaceBinaryPositionReadable- Parameters:
pos- Position.- Returns:
- Value.
-
readIntPositioned
public int readIntPositioned(int pos)
Read integer at the given position.- Specified by:
readIntPositionedin interfaceBinaryPositionReadable- Parameters:
pos- Position.- Returns:
- Value.
-
readLength
public int readLength()
- Returns:
- Read length of array.
-
readStringLength
public int readStringLength()
Read string length.- Returns:
- String length.
-
readString
public String readString()
Reads string.- Returns:
- String.
-
skipValue
public void skipValue()
-
getValueQuickly
public Object getValueQuickly(int pos, int len)
- Parameters:
pos- Position.len- Length.- Returns:
- Object.
-
parseValue
public Object parseValue()
- Returns:
- Parsed value.
-
array
public byte[] array()
- Returns:
- Array.
-
position
public int position()
- Returns:
- Position of reader.
-
position
public void position(int pos)
- Parameters:
pos- New pos.
-
skip
public void skip(int n)
- Parameters:
n- Number of bytes to skip.
-
-