|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjdbm.recman.BlockIo
public final class BlockIo
This class wraps a page-sized byte array and provides methods to read and write data to and from it. The readers and writers are just the ones that the rest of the toolkit needs, nothing else. Values written are compatible with java.io routines. This block is never accessed directly, so it does not have to be thread-safe.
DataInput,
DataOutput,
Serialized Form| Field Summary | |
|---|---|
static long |
serialVersionUID
|
| Constructor Summary | |
|---|---|
BlockIo()
Default constructor for serialization |
|
| Method Summary | |
|---|---|
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 |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final long serialVersionUID
| Constructor Detail |
|---|
public BlockIo()
| Method Detail |
|---|
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 byte
public 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 short
public 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 int
public 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 long
public 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 String toString()
toString in class Object
public void readExternal(ObjectInput in)
throws IOException,
ClassNotFoundException
readExternal in interface ExternalizableIOException
ClassNotFoundException
public void writeExternal(ObjectOutput out)
throws IOException
writeExternal in interface ExternalizableIOException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||