public class TypedBytesInput
extends java.lang.Object
| Constructor | Description |
|---|---|
TypedBytesInput(java.io.DataInput in) |
Creates a new instance of TypedBytesInput.
|
| Modifier and Type | Method | Description |
|---|---|---|
static TypedBytesInput |
get(java.io.DataInput in) |
Get a thread-local typed bytes input for the supplied
DataInput. |
java.lang.Object |
read() |
Reads a typed bytes sequence and converts it to a Java object.
|
boolean |
readBool() |
Reads the boolean following a
Type.BOOL code. |
byte |
readByte() |
Reads the byte following a
Type.BYTE code. |
byte[] |
readBytes() |
Reads the bytes following a
Type.BYTES code. |
double |
readDouble() |
Reads the double following a
Type.DOUBLE code. |
float |
readFloat() |
Reads the float following a
Type.FLOAT code. |
int |
readInt() |
Reads the integer following a
Type.INT code. |
java.util.List |
readList() |
Reads the list following a
Type.LIST code. |
long |
readLong() |
Reads the long following a
Type.LONG code. |
java.util.TreeMap |
readMap() |
Reads the map following a
Type.MAP code. |
int |
readMapHeader() |
Reads the header following a
Type.MAP code. |
byte[] |
readRaw() |
Reads a typed bytes sequence.
|
byte[] |
readRawBool() |
Reads the raw bytes following a
Type.BOOL code. |
byte[] |
readRawByte() |
Reads the raw byte following a
Type.BYTE code. |
byte[] |
readRawBytes() |
Reads the raw bytes following a
Type.BYTES code. |
byte[] |
readRawBytes(int code) |
Reads the raw bytes following a custom code.
|
byte[] |
readRawDouble() |
Reads the raw bytes following a
Type.DOUBLE code. |
byte[] |
readRawFloat() |
Reads the raw bytes following a
Type.FLOAT code. |
byte[] |
readRawInt() |
Reads the raw bytes following a
Type.INT code. |
byte[] |
readRawList() |
Reads the raw bytes following a
Type.LIST code. |
byte[] |
readRawLong() |
Reads the raw bytes following a
Type.LONG code. |
byte[] |
readRawMap() |
Reads the raw bytes following a
Type.MAP code. |
byte[] |
readRawString() |
Reads the raw bytes following a
Type.STRING code. |
byte[] |
readRawVector() |
Reads the raw bytes following a
Type.VECTOR code. |
java.lang.String |
readString() |
Reads the string following a
Type.STRING code. |
Type |
readType() |
Reads a type byte and returns the corresponding
Type. |
java.util.ArrayList |
readVector() |
Reads the vector following a
Type.VECTOR code. |
int |
readVectorHeader() |
Reads the header following a
Type.VECTOR code. |
boolean |
skipType() |
Skips a type byte.
|
public TypedBytesInput(java.io.DataInput in)
public static TypedBytesInput get(java.io.DataInput in)
DataInput.in - data input objectDataInput.public java.lang.Object read()
throws java.io.IOException
java.io.IOExceptionpublic byte[] readRaw()
throws java.io.IOException
java.io.IOExceptionpublic Type readType() throws java.io.IOException
Type.java.io.IOExceptionpublic boolean skipType()
throws java.io.IOException
java.io.IOExceptionpublic byte[] readBytes()
throws java.io.IOException
Type.BYTES code.java.io.IOExceptionpublic byte[] readRawBytes(int code)
throws java.io.IOException
code - the custom type codejava.io.IOExceptionpublic byte[] readRawBytes()
throws java.io.IOException
Type.BYTES code.java.io.IOExceptionpublic byte readByte()
throws java.io.IOException
Type.BYTE code.java.io.IOExceptionpublic byte[] readRawByte()
throws java.io.IOException
Type.BYTE code.java.io.IOExceptionpublic boolean readBool()
throws java.io.IOException
Type.BOOL code.java.io.IOExceptionpublic byte[] readRawBool()
throws java.io.IOException
Type.BOOL code.java.io.IOExceptionpublic int readInt()
throws java.io.IOException
Type.INT code.java.io.IOExceptionpublic byte[] readRawInt()
throws java.io.IOException
Type.INT code.java.io.IOExceptionpublic long readLong()
throws java.io.IOException
Type.LONG code.java.io.IOExceptionpublic byte[] readRawLong()
throws java.io.IOException
Type.LONG code.java.io.IOExceptionpublic float readFloat()
throws java.io.IOException
Type.FLOAT code.java.io.IOExceptionpublic byte[] readRawFloat()
throws java.io.IOException
Type.FLOAT code.java.io.IOExceptionpublic double readDouble()
throws java.io.IOException
Type.DOUBLE code.java.io.IOExceptionpublic byte[] readRawDouble()
throws java.io.IOException
Type.DOUBLE code.java.io.IOExceptionpublic java.lang.String readString()
throws java.io.IOException
Type.STRING code.java.io.IOExceptionpublic byte[] readRawString()
throws java.io.IOException
Type.STRING code.java.io.IOExceptionpublic java.util.ArrayList readVector()
throws java.io.IOException
Type.VECTOR code.java.io.IOExceptionpublic byte[] readRawVector()
throws java.io.IOException
Type.VECTOR code.java.io.IOExceptionpublic int readVectorHeader()
throws java.io.IOException
Type.VECTOR code.java.io.IOExceptionpublic java.util.List readList()
throws java.io.IOException
Type.LIST code.java.io.IOExceptionpublic byte[] readRawList()
throws java.io.IOException
Type.LIST code.java.io.IOExceptionpublic java.util.TreeMap readMap()
throws java.io.IOException
Type.MAP code.java.io.IOExceptionpublic byte[] readRawMap()
throws java.io.IOException
Type.MAP code.java.io.IOExceptionpublic int readMapHeader()
throws java.io.IOException
Type.MAP code.java.io.IOExceptionCopyright © 2008–2025 Apache Software Foundation. All rights reserved.