org.progeeks.util
Class BinaryDataOutputStream

java.lang.Object
  extended by org.progeeks.util.BinaryDataOutputStream
All Implemented Interfaces:
java.io.DataOutput

public class BinaryDataOutputStream
extends java.lang.Object
implements java.io.DataOutput

Output stream that will write data in intel byte-ordered format.

Version:
$Revision: 1.2 $
Author:
Paul Wisneskey

Constructor Summary
BinaryDataOutputStream(java.io.OutputStream out)
           
 
Method Summary
 void close()
           
 void flush()
           
 boolean isLittleEndian()
           
 void setLittleEndian(boolean littleEndian)
           
 void write(byte[] bytes)
           
 void write(byte[] bytes, int offset, int length)
           
 void write(int value)
           
 void writeBoolean(boolean value)
           
 void writeByte(int value)
           
 void writeBytes(java.lang.String string)
           
 void writeChar(int c)
           
 void writeChars(java.lang.String string)
           
 void writeDouble(double value)
           
 void writeFloat(float value)
           
 void writeInt(int value)
           
 void writeLong(long value)
           
 void writeShort(int value)
           
 void writeUTF(java.lang.String arg0)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BinaryDataOutputStream

public BinaryDataOutputStream(java.io.OutputStream out)
Method Detail

setLittleEndian

public void setLittleEndian(boolean littleEndian)

isLittleEndian

public boolean isLittleEndian()

write

public void write(byte[] bytes,
                  int offset,
                  int length)
           throws java.io.IOException
Specified by:
write in interface java.io.DataOutput
Throws:
java.io.IOException

write

public void write(byte[] bytes)
           throws java.io.IOException
Specified by:
write in interface java.io.DataOutput
Throws:
java.io.IOException

write

public void write(int value)
           throws java.io.IOException
Specified by:
write in interface java.io.DataOutput
Throws:
java.io.IOException

writeBoolean

public void writeBoolean(boolean value)
                  throws java.io.IOException
Specified by:
writeBoolean in interface java.io.DataOutput
Throws:
java.io.IOException

writeByte

public void writeByte(int value)
               throws java.io.IOException
Specified by:
writeByte in interface java.io.DataOutput
Throws:
java.io.IOException

writeShort

public void writeShort(int value)
                throws java.io.IOException
Specified by:
writeShort in interface java.io.DataOutput
Throws:
java.io.IOException

writeChar

public void writeChar(int c)
               throws java.io.IOException
Specified by:
writeChar in interface java.io.DataOutput
Throws:
java.io.IOException

writeInt

public void writeInt(int value)
              throws java.io.IOException
Specified by:
writeInt in interface java.io.DataOutput
Throws:
java.io.IOException

writeLong

public void writeLong(long value)
               throws java.io.IOException
Specified by:
writeLong in interface java.io.DataOutput
Throws:
java.io.IOException

writeFloat

public void writeFloat(float value)
                throws java.io.IOException
Specified by:
writeFloat in interface java.io.DataOutput
Throws:
java.io.IOException

writeDouble

public void writeDouble(double value)
                 throws java.io.IOException
Specified by:
writeDouble in interface java.io.DataOutput
Throws:
java.io.IOException

writeBytes

public void writeBytes(java.lang.String string)
                throws java.io.IOException
Specified by:
writeBytes in interface java.io.DataOutput
Throws:
java.io.IOException

writeChars

public void writeChars(java.lang.String string)
                throws java.io.IOException
Specified by:
writeChars in interface java.io.DataOutput
Throws:
java.io.IOException

writeUTF

public void writeUTF(java.lang.String arg0)
              throws java.io.IOException
Specified by:
writeUTF in interface java.io.DataOutput
Throws:
java.io.IOException

close

public void close()
           throws java.io.IOException
Throws:
java.io.IOException

flush

public void flush()
           throws java.io.IOException
Throws:
java.io.IOException


Copyright © 2002-2003 Paul Speed. All Rights Reserved.