Constructor and Description |
---|
BufferWritable(byte[] inBuf)
Constructs a BufferWritable.
|
Modifier and Type | Method and Description |
---|---|
void |
append(byte[] app)
Appends given app's buffer to existing buffer.
|
void |
readFields(java.io.DataInput in)
Deserializes the fields of this object from
in . |
void |
write(java.io.DataOutput out)
Serializes the fields of this object to
out . |
public BufferWritable(byte[] inBuf)
inBuf
- bufferpublic void write(java.io.DataOutput out) throws java.io.IOException
out
.public void readFields(java.io.DataInput in)
in
.
For efficiency, implementations should attempt to re-use storage in the existing object where possible.
readFields
in interface Writable
in
- DataInput
to deserialize this object fromjava.lang.UnsupportedOperationException
- this function is not supportedpublic void append(byte[] app)
app
- buffer to append