public final class BlockIo extends Object implements Externalizable
DataInput,
DataOutput,
Serialized Form| Modifier and Type | Field and Description |
|---|---|
static long |
serialVersionUID |
| Constructor and Description |
|---|
BlockIo()
Default constructor for serialization
|
| Modifier and Type | Method and Description |
|---|---|
BlockView |
getView() |
byte |
readByte(int pos)
Reads a byte from the indicated position
|
void |
readExternal(ObjectInput in)
implement externalizable interface
|
int |
readInt(int pos)
Reads an int from the indicated position
|
long |
readLong(int pos)
Reads a long from the indicated position
|
short |
readShort(int pos)
Reads a short from the indicated position
|
void |
setView(BlockView view)
Sets the current view of the block.
|
String |
toString() |
void |
writeByte(int pos,
byte value)
Writes a byte to the indicated position
|
void |
writeExternal(ObjectOutput out)
implement externalizable interface
|
void |
writeInt(int pos,
int value)
Writes an int to the indicated position
|
void |
writeLong(int pos,
long value)
Writes a long to the indicated position
|
void |
writeShort(int pos,
short value)
Writes a short to the indicated position
|
public static final long serialVersionUID
public BlockView getView()
public void setView(BlockView view)
view - the current viewpublic byte readByte(int pos)
pos - the position at which we will read the bytepublic void writeByte(int pos,
byte value)
pos - The position where we want to write the value tovalue - the byte value we want to write into the BlockIopublic short readShort(int pos)
pos - the position at which we will read the shortpublic void writeShort(int pos,
short value)
pos - The position where we want to write the value tovalue - the short value we want to write into the BlockIopublic int readInt(int pos)
pos - the position at which we will read the intpublic void writeInt(int pos,
int value)
pos - The position where we want to write the value tovalue - the int value we want to write into the BlockIopublic long readLong(int pos)
pos - the position at which we will read the longpublic void writeLong(int pos,
long value)
pos - The position where we want to write the value tovalue - the long value we want to write into the BlockIopublic void readExternal(ObjectInput in) throws IOException, ClassNotFoundException
readExternal in interface ExternalizableIOExceptionClassNotFoundExceptionpublic void writeExternal(ObjectOutput out) throws IOException
writeExternal in interface ExternalizableIOExceptionCopyright © 2003–2014 The Apache Software Foundation. All rights reserved.