com.tagtraum.perf.io
Class XtendedDataOutputStream

java.lang.Object
  |
  +--java.io.OutputStream
        |
        +--java.io.FilterOutputStream
              |
              +--java.io.DataOutputStream
                    |
                    +--com.tagtraum.perf.io.XtendedDataOutputStream
All Implemented Interfaces:
java.io.DataOutput

public class XtendedDataOutputStream
extends java.io.DataOutputStream

Writes bits to a stream.

Version:
$Id: $
Author:
Hendrik Schreiber
See Also:
XtendedDataInputStream

Field Summary
 
Fields inherited from class java.io.DataOutputStream
written
 
Fields inherited from class java.io.FilterOutputStream
out
 
Constructor Summary
XtendedDataOutputStream(java.io.OutputStream out)
           
 
Method Summary
 void flush()
          Flushes the stream.
 void writeBit(boolean bitval)
          Writes a bit to the underlying stream.
 void writeHalfByte(int hb)
          Writes half a byte to the underlying stream.
 
Methods inherited from class java.io.DataOutputStream
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

XtendedDataOutputStream

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

writeHalfByte

public void writeHalfByte(int hb)
                   throws java.io.IOException
Writes half a byte to the underlying stream.

java.io.IOException

writeBit

public void writeBit(boolean bitval)
              throws java.io.IOException
Writes a bit to the underlying stream.

java.io.IOException

flush

public void flush()
           throws java.io.IOException
Flushes the stream.

Note: If less than 8 bits have been written, 8 bits are written nevertheless. The not explicitly set bits default to false.

Note: If less than 8 bits have been written, 8 bits are written nevertheless. The not explicitly set bits default to false.

Overrides:
flush in class java.io.DataOutputStream
java.io.IOException


Copyright © 2002 Hendrik Schreiber
http://www.tagtraum.com/performance/
This software can be distributed under LGPL