|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectappl.parallel.data.xulugridfile.BufferedHelper
public class BufferedHelper
The methods of this class can be used to efficiently read or write values
into a Bytestream (it is e.g. used by the XuluGridFile
).
Constructor Summary | |
---|---|
BufferedHelper()
|
Method Summary | |
---|---|
static int |
readIntFromStream(ByteArrayInputStream input)
Reads a long value out of the given bytestream Used for buffered reading. |
static long |
readLongFromStream(ByteArrayInputStream input)
Reads a long value out of the given ByteArrayInputStream . |
static void |
writeInt(int v,
ByteArrayOutputStream output)
Writes a int value in the the given bytestream Used for buffered writing. |
static void |
writeLong(long v,
ByteArrayOutputStream output)
Writes a long to the stream as eight bytes, high byte
first. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public BufferedHelper()
Method Detail |
---|
public static final int readIntFromStream(ByteArrayInputStream input) throws IOException
RandomAccessFile.readInt()
IOException
- if an I/O error occurs.public static final void writeInt(int v, ByteArrayOutputStream output) throws IOException
RandomAccessFile.writeInt(int)
IOException
- if an I/O error occurs.public static final void writeLong(long v, ByteArrayOutputStream output) throws IOException
long
to the stream as eight bytes, high byte
first. The write starts at the current position of the file pointer. Used
for buffered writing. Used the code of
RandomAccessFile.writeLong(long)
output
- the stream to be written tov
- a long
to be written.
IOException
- if an I/O error occurs.public static final long readLongFromStream(ByteArrayInputStream input) throws IOException
ByteArrayInputStream
. Used for buffered
reading. Used the code of RandomAccessFile.readLong()
*
IOException
- if an I/O error occurs.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |