|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.io.OutputStream
java.io.FilterOutputStream
java.io.DataOutputStream
EndianCorrectOutputStream
EndianCorrectOutputStream extends DataOutputStream; it will optionally flip bytes to write little endian data correctly.
Field Summary |
Fields inherited from class java.io.DataOutputStream |
written |
Fields inherited from class java.io.FilterOutputStream |
out |
Constructor Summary | |
EndianCorrectOutputStream(java.io.OutputStream os,
boolean be)
Constructor for an OutputStream. |
|
EndianCorrectOutputStream(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 |
void |
writeDoubleCorrect(double val)
writeDoubleCorrect will write a double to the stream |
void |
writeFloatCorrect(float val)
writeFloatCorrect will write a float to the stream |
void |
writeIntCorrect(int val)
writeIntCorrect will write an int to the stream |
void |
writeLongCorrect(long val)
writeLongCorrect will write a long to the stream |
void |
writeShortCorrect(short val)
writeShortCorrect will write a short to the stream |
Methods inherited from class java.io.DataOutputStream |
flush, size, write, write, writeBoolean, writeByte, writeBytes, writeChar, writeChars, writeDouble, writeFloat, writeInt, writeLong, writeShort, writeUTF |
Methods inherited from class java.io.FilterOutputStream |
close, write |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface java.io.DataOutput |
write |
Constructor Detail |
public EndianCorrectOutputStream(java.lang.String filename, boolean be) throws java.io.FileNotFoundException, java.lang.SecurityException
filename
- filename for datafilebe
- -- endian flag: if be (big endian) is false bytes will be flipped on write
java.io.FileNotFoundException
java.lang.SecurityException
public EndianCorrectOutputStream(java.io.OutputStream os, boolean be)
os
- OutputStream to write data tobe
- -- endian flag: if be (big endian) is false bytes will be flipped on write
java.io.FileNotFoundException
Method Detail |
public void writeShortCorrect(short val) throws java.io.IOException
java.io.IOException
public short flipShort(short val)
public void writeIntCorrect(int val) throws java.io.IOException
java.io.IOException
public int flipInt(int val)
public void writeLongCorrect(long val) throws java.io.IOException
java.io.IOException
public long flipLong(long val)
public void writeFloatCorrect(float val) throws java.io.IOException
java.io.IOException
public float flipFloat(float val) throws java.io.IOException
java.io.IOException
public void writeDoubleCorrect(double val) 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 |