|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.hadoop.typedbytes.TypedBytesOutput
public class TypedBytesOutput
Provides functionality for writing typed bytes.
| Constructor Summary | |
|---|---|
TypedBytesOutput(DataOutput out)
Creates a new instance of TypedBytesOutput. |
|
| Method Summary | |
|---|---|
static TypedBytesOutput |
get(DataOutput out)
Get a thread-local typed bytes output for the supplied DataOutput. |
void |
write(Object obj)
Writes a Java object as a typed bytes sequence. |
void |
writeBool(boolean b)
Writes a boolean as a typed bytes sequence. |
void |
writeByte(byte b)
Writes a byte as a typed bytes sequence. |
void |
writeBytes(byte[] bytes)
Writes a bytes array as a typed bytes sequence. |
void |
writeBytes(byte[] bytes,
int code)
Writes a bytes array as a typed bytes sequence, using a given typecode. |
void |
writeDouble(double d)
Writes a double as a typed bytes sequence. |
void |
writeFloat(float f)
Writes a float as a typed bytes sequence. |
void |
writeInt(int i)
Writes an integer as a typed bytes sequence. |
void |
writeList(List list)
Writes a list as a typed bytes sequence. |
void |
writeListFooter()
Writes a list footer. |
void |
writeListHeader()
Writes a list header. |
void |
writeLong(long l)
Writes a long as a typed bytes sequence. |
void |
writeMap(Map map)
Writes a map as a typed bytes sequence. |
void |
writeMapHeader(int length)
Writes a map header. |
void |
writeRaw(byte[] bytes)
Writes a raw sequence of typed bytes. |
void |
writeRaw(byte[] bytes,
int offset,
int length)
Writes a raw sequence of typed bytes. |
void |
writeString(String s)
Writes a string as a typed bytes sequence. |
void |
writeVector(ArrayList vector)
Writes a vector as a typed bytes sequence. |
void |
writeVectorHeader(int length)
Writes a vector header. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public TypedBytesOutput(DataOutput out)
| Method Detail |
|---|
public static TypedBytesOutput get(DataOutput out)
DataOutput.
out - data output object
DataOutput.
public void write(Object obj)
throws IOException
obj - the object to be written
IOException
public void writeRaw(byte[] bytes)
throws IOException
bytes - the bytes to be written
IOException
public void writeRaw(byte[] bytes,
int offset,
int length)
throws IOException
bytes - the bytes to be writtenoffset - an offset in the given arraylength - number of bytes from the given array to write
IOException
public void writeBytes(byte[] bytes,
int code)
throws IOException
bytes - the bytes array to be writtencode - the typecode to use
IOException
public void writeBytes(byte[] bytes)
throws IOException
bytes - the bytes array to be written
IOException
public void writeByte(byte b)
throws IOException
b - the byte to be written
IOException
public void writeBool(boolean b)
throws IOException
b - the boolean to be written
IOException
public void writeInt(int i)
throws IOException
i - the integer to be written
IOException
public void writeLong(long l)
throws IOException
l - the long to be written
IOException
public void writeFloat(float f)
throws IOException
f - the float to be written
IOException
public void writeDouble(double d)
throws IOException
d - the double to be written
IOException
public void writeString(String s)
throws IOException
s - the string to be written
IOException
public void writeVector(ArrayList vector)
throws IOException
vector - the vector to be written
IOException
public void writeVectorHeader(int length)
throws IOException
length - the number of elements in the vector
IOException
public void writeList(List list)
throws IOException
list - the list to be written
IOException
public void writeListHeader()
throws IOException
IOException
public void writeListFooter()
throws IOException
IOException
public void writeMap(Map map)
throws IOException
map - the map to be written
IOException
public void writeMapHeader(int length)
throws IOException
length - the number of key-value pairs in the map
IOException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||