|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnl.javel.gisbeans.io.ObjectEndianInputStream
public class ObjectEndianInputStream
This class enables the object inputstream to be switched from little to big endian. The class works exactly like an ObjectInputStream
Field Summary |
---|
Fields inherited from interface nl.javel.gisbeans.io.EndianInterface |
---|
BIG_ENDIAN, LITTLE_ENDIAN |
Constructor Summary | |
---|---|
ObjectEndianInputStream(InputStream inputStream)
constructs a new ObjectEndianInputStream |
Method Summary | |
---|---|
void |
close()
|
int |
getEncode()
returns the encode |
int |
read(byte[] b)
reads b from the stream |
int |
read(byte[] b,
int off,
int len)
reads b from the stream |
boolean |
readBoolean()
|
byte |
readByte()
|
char |
readChar()
|
double |
readDouble()
|
float |
readFloat()
reads a float from the stream |
void |
readFully(byte[] b)
|
void |
readFully(byte[] b,
int off,
int len)
|
int |
readInt()
|
String |
readLine()
|
long |
readLong()
|
short |
readShort()
|
int |
readUnsignedByte()
|
int |
readUnsignedShort()
|
String |
readUTF()
|
static String |
readUTF(DataInput dataInput)
reads UTF from the stream |
void |
setEncode(int encode)
sets the Encode |
int |
skipBytes(int n)
|
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ObjectEndianInputStream(InputStream inputStream)
inputStream
- the inputStream to useMethod Detail |
---|
public final short readShort() throws IOException
readShort
in interface DataInput
IOException
DataInput.readShort()
public final int readUnsignedShort() throws IOException
readUnsignedShort
in interface DataInput
IOException
DataInput.readUnsignedShort()
public final char readChar() throws IOException
readChar
in interface DataInput
IOException
DataInput.readChar()
public final int readInt() throws IOException
readInt
in interface DataInput
IOException
DataInput.readInt()
public final long readLong() throws IOException
readLong
in interface DataInput
IOException
DataInput.readLong()
public final float readFloat() throws IOException
readFloat
in interface DataInput
IOException
DataInput.readFloat()
public final double readDouble() throws IOException
readDouble
in interface DataInput
IOException
DataInput.readDouble()
public final int read(byte[] b) throws IOException
b
-
IOException
- on failurepublic final int read(byte[] b, int off, int len) throws IOException
b
- off
- len
-
IOException
- on failurepublic final void readFully(byte[] b) throws IOException
readFully
in interface DataInput
IOException
DataInput.readFully(byte[])
public final void readFully(byte[] b, int off, int len) throws IOException
readFully
in interface DataInput
IOException
DataInput.readFully(byte[], int, int)
public final int skipBytes(int n) throws IOException
skipBytes
in interface DataInput
IOException
DataInput.skipBytes(int)
public final boolean readBoolean() throws IOException
readBoolean
in interface DataInput
IOException
DataInput.readBoolean()
public final byte readByte() throws IOException
readByte
in interface DataInput
IOException
DataInput.readByte()
public final int readUnsignedByte() throws IOException
readUnsignedByte
in interface DataInput
IOException
DataInput.readUnsignedByte()
public final String readUTF() throws IOException
readUTF
in interface DataInput
IOException
DataInput.readUTF()
public final String readLine()
readLine
in interface DataInput
DataInput.readLine()
public static final String readUTF(DataInput dataInput) throws IOException
dataInput
-
IOException
public final void close() throws IOException
IOException
public void setEncode(int encode)
EndianInterface
setEncode
in interface EndianInterface
encode
- the encode which is either BIG_ENDIAN or LITTLE_ENDIANEndianInterface.setEncode(int)
public int getEncode()
EndianInterface
getEncode
in interface EndianInterface
EndianInterface.getEncode()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |