hu.netmind.util
Class LSBDataOutputStream

java.lang.Object
  extended by java.io.OutputStream
      extended by hu.netmind.util.LSBDataOutputStream
All Implemented Interfaces:
java.io.Closeable, java.io.Flushable

public class LSBDataOutputStream
extends java.io.OutputStream

This class enables to write multi-byte data in LSB (least significant byte first) order.


Constructor Summary
LSBDataOutputStream(java.io.OutputStream output)
          Construct with a stream given.
 
Method Summary
 void close()
          Proxy call to output.
 void flush()
          Proxy call to output.
 void write(int b)
          Proxy call to output.
 void writeByte(int i)
          Write a single byte to output.
 void writeInt(int i)
          Write an integer to output LSB.
 void writeLong(long l)
          Write a long to output LSB.
 
Methods inherited from class java.io.OutputStream
write, write
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LSBDataOutputStream

public LSBDataOutputStream(java.io.OutputStream output)
Construct with a stream given.

Parameters:
output - The physical output stream to write to.
Method Detail

close

public void close()
           throws java.io.IOException
Proxy call to output.

Specified by:
close in interface java.io.Closeable
Overrides:
close in class java.io.OutputStream
Throws:
java.io.IOException - If the output produced an I/O error.

flush

public void flush()
           throws java.io.IOException
Proxy call to output.

Specified by:
flush in interface java.io.Flushable
Overrides:
flush in class java.io.OutputStream
Throws:
java.io.IOException - If the output produced an I/O error.

write

public void write(int b)
           throws java.io.IOException
Proxy call to output.

Specified by:
write in class java.io.OutputStream
Parameters:
b - The byte to write.
Throws:
java.io.IOException - If the output produced an I/O error.

writeByte

public void writeByte(int i)
               throws java.io.IOException
Write a single byte to output.

Parameters:
i - The byte to write.
Throws:
java.io.IOException - If the output produced an I/O error.

writeInt

public void writeInt(int i)
              throws java.io.IOException
Write an integer to output LSB.

Parameters:
i - The integer to write.
Throws:
java.io.IOException - If the output produced an I/O error.

writeLong

public void writeLong(long l)
               throws java.io.IOException
Write a long to output LSB.

Parameters:
l - The long to write.
Throws:
java.io.IOException - If the output produced an I/O error.