|
||||||||||
| 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 use| Method Detail |
|---|
public final short readShort()
throws IOException
readShort in interface DataInputIOExceptionDataInput.readShort()
public final int readUnsignedShort()
throws IOException
readUnsignedShort in interface DataInputIOExceptionDataInput.readUnsignedShort()
public final char readChar()
throws IOException
readChar in interface DataInputIOExceptionDataInput.readChar()
public final int readInt()
throws IOException
readInt in interface DataInputIOExceptionDataInput.readInt()
public final long readLong()
throws IOException
readLong in interface DataInputIOExceptionDataInput.readLong()
public final float readFloat()
throws IOException
readFloat in interface DataInputIOExceptionDataInput.readFloat()
public final double readDouble()
throws IOException
readDouble in interface DataInputIOExceptionDataInput.readDouble()
public final int read(byte[] b)
throws IOException
b -
IOException - on failure
public final int read(byte[] b,
int off,
int len)
throws IOException
b - off - len -
IOException - on failure
public final void readFully(byte[] b)
throws IOException
readFully in interface DataInputIOExceptionDataInput.readFully(byte[])
public final void readFully(byte[] b,
int off,
int len)
throws IOException
readFully in interface DataInputIOExceptionDataInput.readFully(byte[], int, int)
public final int skipBytes(int n)
throws IOException
skipBytes in interface DataInputIOExceptionDataInput.skipBytes(int)
public final boolean readBoolean()
throws IOException
readBoolean in interface DataInputIOExceptionDataInput.readBoolean()
public final byte readByte()
throws IOException
readByte in interface DataInputIOExceptionDataInput.readByte()
public final int readUnsignedByte()
throws IOException
readUnsignedByte in interface DataInputIOExceptionDataInput.readUnsignedByte()
public final String readUTF()
throws IOException
readUTF in interface DataInputIOExceptionDataInput.readUTF()public final String readLine()
readLine in interface DataInputDataInput.readLine()
public static final String readUTF(DataInput dataInput)
throws IOException
dataInput -
IOException
public final void close()
throws IOException
IOExceptionpublic void setEncode(int encode)
EndianInterface
setEncode in interface EndianInterfaceencode - the encode which is either BIG_ENDIAN or LITTLE_ENDIANEndianInterface.setEncode(int)public int getEncode()
EndianInterface
getEncode in interface EndianInterfaceEndianInterface.getEncode()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||