|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.io.OutputStream
com.bigdata.io.ByteArrayBuffer
com.bigdata.io.DataOutputBuffer
public class DataOutputBuffer
Fast special purpose serialization onto a managed byte[] buffer conforming to
the DataOutput API.
Note: The base classes provide all of the same functionality without
declaring IOException as a thrown exception.
| Field Summary |
|---|
| Fields inherited from class com.bigdata.io.ByteArrayBuffer |
|---|
DEFAULT_INITIAL_CAPACITY, INFO, log |
| Constructor Summary | |
|---|---|
DataOutputBuffer()
Uses ByteArrayBuffer.DEFAULT_INITIAL_CAPACITY. |
|
DataOutputBuffer(InputStream in)
Reads the entire input stream into the buffer. |
|
DataOutputBuffer(int initialCapacity)
|
|
DataOutputBuffer(int len,
byte[] buf)
|
|
DataOutputBuffer(ObjectInput in)
Reads the entire input stream into the buffer. |
|
| Method Summary | |
|---|---|
DataOutputBuffer |
reset()
Conforms the return type to an instance of this class. |
void |
write(DataInput in,
int len)
Read len bytes into the buffer. |
void |
writeBoolean(boolean v)
|
void |
writeByte(int v)
|
void |
writeBytes(String s)
|
void |
writeChar(int v)
|
void |
writeChars(String s)
|
void |
writeDouble(double v)
|
void |
writeFloat(float v)
|
void |
writeInt(int v)
|
void |
writeLong(long v)
|
void |
writeShort(int v)
|
void |
writeUTF(String str)
|
| Methods inherited from class com.bigdata.io.ByteArrayBuffer |
|---|
array, asByteBuffer, assertNonNegative, capacity, copy, copyAll, copyRest, ensureCapacity, ensureFree, ensureFree, extend, flip, get, get, getBit, getByte, getByte, getDouble, getDouble, getFloat, getFloat, getInt, getInt, getLong, getLong, getNibbleLength, getOutputBitStream, getShort, getShort, len, limit, mark, off, packLong, packShort, pos, pos, position, position, put, put, put, put, putByte, putByte, putDouble, putDouble, putFloat, putFloat, putInt, putInt, putLong, putLong, putShort, putShort, remaining, rewind, setBit, skip, slice, toByteArray, trim, write, write, write |
| Methods inherited from class java.io.OutputStream |
|---|
close, flush |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface java.io.DataOutput |
|---|
write, write, write |
| Constructor Detail |
|---|
public DataOutputBuffer()
ByteArrayBuffer.DEFAULT_INITIAL_CAPACITY.
public DataOutputBuffer(int initialCapacity)
initialCapacity - The initial capacity of the internal byte[].
public DataOutputBuffer(int len,
byte[] buf)
len - The #of bytes of data already in the provided buffer.buf - The buffer, with len pre-existing bytes of valid data.
The buffer reference is used directly rather than making a
copy of the data.
public DataOutputBuffer(InputStream in)
throws IOException
ByteArrayBuffer.buf from position 0 (inclusive) through position
ByteArrayBuffer.pos (exclusive).
IOException
public DataOutputBuffer(ObjectInput in)
throws IOException
ByteArrayBuffer.buf from position 0 (inclusive) through position
ByteArrayBuffer.pos (exclusive).
IOException| Method Detail |
|---|
public DataOutputBuffer reset()
reset in class ByteArrayBuffer
public final void write(DataInput in,
int len)
throws IOException
in - The input source.len - The #of bytes to read.
EOFException - if the EOF is reached before len bytes have been read.
IOException - if an I/O error occurs.
public final void writeBoolean(boolean v)
throws IOException
writeBoolean in interface DataOutputIOException
public final void writeByte(int v)
throws IOException
writeByte in interface DataOutputIOException
public final void writeDouble(double v)
throws IOException
writeDouble in interface DataOutputIOException
public final void writeFloat(float v)
throws IOException
writeFloat in interface DataOutputIOException
public final void writeInt(int v)
throws IOException
writeInt in interface DataOutputIOException
public final void writeLong(long v)
throws IOException
writeLong in interface DataOutputIOException
public final void writeShort(int v)
throws IOException
writeShort in interface DataOutputIOException
public final void writeChar(int v)
throws IOException
writeChar in interface DataOutputIOException
public void writeBytes(String s)
throws IOException
writeBytes in interface DataOutputIOException
public void writeChars(String s)
throws IOException
writeChars in interface DataOutputIOException
public void writeUTF(String str)
throws IOException
writeUTF in interface DataOutputIOExceptionName2Addr to store the index names., Consider changing the access modified on the desired method using
reflection.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||