wtanaka.praya.gale
Class GaleInputStream
java.lang.Object
|
+--java.io.InputStream
|
+--java.io.FilterInputStream
|
+--java.io.DataInputStream
|
+--wtanaka.praya.gale.GaleInputStream
- All Implemented Interfaces:
- java.io.DataInput
- public class GaleInputStream
- extends java.io.DataInputStream
Gale input stream with methods to read fragments and operations.
Return to
or the Praya Homepage
- Version:
- $Name: $ $Date: 2002/03/25 01:57:55 $
- Author:
- $Author: wtanaka $
| Fields inherited from class java.io.DataInputStream |
lineBuffer |
| Fields inherited from class java.io.FilterInputStream |
in |
| Fields inherited from class java.io.InputStream |
SKIP_BUFFER_SIZE, skipBuffer |
| Methods inherited from class java.io.DataInputStream |
read, read, readBoolean, readByte, readChar, readDouble, readFloat, readFully, readFully, readInt, readLine, readLong, readShort, readUnsignedByte, readUnsignedShort, readUTF, readUTF, skipBytes |
| Methods inherited from class java.io.FilterInputStream |
available, close, mark, markSupported, read, reset, skip |
| Methods inherited from class java.lang.Object |
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, toString, wait, wait, wait |
GaleInputStream
public GaleInputStream(java.io.InputStream inputstream)
readUnicodeGivenCount
public final java.lang.String readUnicodeGivenCount(int i)
throws java.io.IOException
readU32
public int readU32()
throws java.io.IOException
readCountedUnicode
public final java.lang.String readCountedUnicode()
throws java.io.IOException
readNullTerminated
public final java.lang.String readNullTerminated()
throws java.io.IOException
- Reads a null terminated string. This is a sequence of one-byte
ISO-8859-1 characters, until the first nul ('\0') or until the
end of the stream.
readRLE
public final void readRLE(byte[] encoded)
throws java.io.IOException
readRLE
public final java.math.BigInteger readRLE(int length)
throws java.io.IOException
- Reads length bytes of data from the stream and interprets it as
an RLE encoded BigInteger
- Parameters:
length - the number of bytes to read from the stream- Returns:
- the BigInteger corresponding to the RLE decoded next
length bytes
readTime
public Timestamp readTime()
throws java.io.IOException
- Reads a time from the stream. Time is represented using 128
bits.
readFragment
public FragmentInterface readFragment()
throws java.io.IOException
readOperation
public OperationInterface readOperation()
throws java.io.IOException
- Reads the next operation from the stream.
- Returns:
- the next operation
- Throws:
RecoverableCorruptionException - if there was a problem
parsing the data, but all of the data was read from the stream,
so that the stream is in a "good" state.java.io.IOException - if there was a problem reading the data