|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.io.InputStream
java.io.FilterInputStream
java.io.DataInputStream
EndianCorrectInputStream
EndianCorrectInputStream extends DataInputStream; it will optionally flip bytes to read little endian data correctly.
Field Summary |
Fields inherited from class java.io.FilterInputStream |
in |
Constructor Summary | |
EndianCorrectInputStream(java.io.InputStream is,
boolean be)
Constructor for an InputStream. |
|
EndianCorrectInputStream(java.lang.String filename,
boolean be)
Constructor for a disk file. |
Method Summary | |
double |
flipDouble(double val)
flipDouble will flip the byte order of a double |
float |
flipFloat(float val)
flipFloat will flip the byte order of a float |
int |
flipInt(int val)
flipInt will flip the byte order of an int |
long |
flipLong(long val)
flipLong will flip the byte order of a long |
short |
flipShort(short val)
flipShort will byte flip a short |
double |
readDoubleCorrect()
readDoubleCorrect will return a double from the stream |
float |
readFloatCorrect()
readFloatCorrect will return a float from the stream |
int |
readIntCorrect()
readIntCorrect will return an int from the stream |
long |
readLongCorrect()
readLongCorrect will return a long from the stream |
short |
readShortCorrect()
readShortCorrect will return a short from the stream |
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, toString, wait, wait, wait |
Constructor Detail |
public EndianCorrectInputStream(java.lang.String filename, boolean be) throws java.io.FileNotFoundException
filename
- filename for datafilebe
- -- endian flag: if be (big endian) is false bytes will be flipped on read
java.io.FileNotFoundException
public EndianCorrectInputStream(java.io.InputStream is, boolean be)
is
- InputStream to read data frombe
- -- endian flag: if be (big endian) is false bytes will be flipped on read
java.io.FileNotFoundException
Method Detail |
public short readShortCorrect() throws java.io.IOException
java.io.IOException
public short flipShort(short val)
public int readIntCorrect() throws java.io.IOException
java.io.IOException
public int flipInt(int val)
public long readLongCorrect() throws java.io.IOException
java.io.IOException
public long flipLong(long val)
public float readFloatCorrect() throws java.io.IOException
java.io.IOException
public float flipFloat(float val) throws java.io.IOException
java.io.IOException
public double readDoubleCorrect() throws java.io.IOException
java.io.IOException
public double flipDouble(double val)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |