|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.hadoop.typedbytes.TypedBytesInput
public class TypedBytesInput
Provides functionality for reading typed bytes.
| Constructor Summary | |
|---|---|
TypedBytesInput(DataInput in)
Creates a new instance of TypedBytesInput. |
|
| Method Summary | |
|---|---|
static TypedBytesInput |
get(DataInput in)
Get a thread-local typed bytes input for the supplied DataInput. |
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. |
List |
readList()
Reads the list following a Type.LIST code. |
long |
readLong()
Reads the long following a Type.LONG code. |
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. |
String |
readString()
Reads the string following a Type.STRING code. |
Type |
readType()
Reads a type byte and returns the corresponding Type. |
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. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public TypedBytesInput(DataInput in)
| Method Detail |
|---|
public static TypedBytesInput get(DataInput in)
DataInput.
in - data input object
DataInput.
public Object read()
throws IOException
IOException
public byte[] readRaw()
throws IOException
IOException
public Type readType()
throws IOException
Type.
IOException
public boolean skipType()
throws IOException
IOException
public byte[] readBytes()
throws IOException
Type.BYTES code.
IOException
public byte[] readRawBytes(int code)
throws IOException
code - the custom type code
IOException
public byte[] readRawBytes()
throws IOException
Type.BYTES code.
IOException
public byte readByte()
throws IOException
Type.BYTE code.
IOException
public byte[] readRawByte()
throws IOException
Type.BYTE code.
IOException
public boolean readBool()
throws IOException
Type.BOOL code.
IOException
public byte[] readRawBool()
throws IOException
Type.BOOL code.
IOException
public int readInt()
throws IOException
Type.INT code.
IOException
public byte[] readRawInt()
throws IOException
Type.INT code.
IOException
public long readLong()
throws IOException
Type.LONG code.
IOException
public byte[] readRawLong()
throws IOException
Type.LONG code.
IOException
public float readFloat()
throws IOException
Type.FLOAT code.
IOException
public byte[] readRawFloat()
throws IOException
Type.FLOAT code.
IOException
public double readDouble()
throws IOException
Type.DOUBLE code.
IOException
public byte[] readRawDouble()
throws IOException
Type.DOUBLE code.
IOException
public String readString()
throws IOException
Type.STRING code.
IOException
public byte[] readRawString()
throws IOException
Type.STRING code.
IOException
public ArrayList readVector()
throws IOException
Type.VECTOR code.
IOException
public byte[] readRawVector()
throws IOException
Type.VECTOR code.
IOException
public int readVectorHeader()
throws IOException
Type.VECTOR code.
IOException
public List readList()
throws IOException
Type.LIST code.
IOException
public byte[] readRawList()
throws IOException
Type.LIST code.
IOException
public TreeMap readMap()
throws IOException
Type.MAP code.
IOException
public byte[] readRawMap()
throws IOException
Type.MAP code.
IOException
public int readMapHeader()
throws IOException
Type.MAP code.
IOException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||