com.fernsroth.easyio
Class EasyIOOutputStream

java.lang.Object
  extended by java.io.OutputStream
      extended by java.io.FilterOutputStream
          extended by com.fernsroth.easyio.EasyIOOutputStream
All Implemented Interfaces:
java.io.Closeable, java.io.Flushable

public class EasyIOOutputStream
extends java.io.FilterOutputStream

Author:
Joseph M. Ferner (Near Infinity Corporation)

Field Summary
 
Fields inherited from class java.io.FilterOutputStream
out
 
Constructor Summary
EasyIOOutputStream(IOutputStream out)
          constructor.
EasyIOOutputStream(java.io.OutputStream out)
          constructor.
 
Method Summary
 long getCount()
          gets the count of bytes written.
 void write(int b)
          
 void write(java.lang.Object obj)
          writes an object to the stream.
 void writeINT64(long val)
          writes an 64-bit integer (little endien).
 void writeUINT16(int val)
          writes an unsigned 16-bit integer (little endien).
 void writeUINT32(long val)
          writes an unsigned 64-bit integer (little endien).
 void writeUINT64(java.math.BigInteger val)
          write a uint64.
 void writeUINT8(int val)
          writes an unsigned 8-bit integer.
 
Methods inherited from class java.io.FilterOutputStream
close, flush, write, write
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EasyIOOutputStream

public EasyIOOutputStream(java.io.OutputStream out)
constructor.

Parameters:
out - the output stream to wrap.

EasyIOOutputStream

public EasyIOOutputStream(IOutputStream out)
constructor.

Parameters:
out - the output stream to wrap.
Method Detail

write

public void write(java.lang.Object obj)
           throws EasyIOException,
                  java.io.IOException
writes an object to the stream.

Parameters:
obj - the object to write.
Throws:
EasyIOException
java.io.IOException

writeINT64

public void writeINT64(long val)
                throws java.io.IOException
writes an 64-bit integer (little endien).

Parameters:
val - the value to write.
Throws:
java.io.IOException

writeUINT64

public void writeUINT64(java.math.BigInteger val)
                 throws java.io.IOException
write a uint64.

Parameters:
val - the value to write.
Throws:
java.io.IOException

writeUINT32

public void writeUINT32(long val)
                 throws java.io.IOException
writes an unsigned 64-bit integer (little endien).

Parameters:
val - the value to write.
Throws:
java.io.IOException

writeUINT16

public void writeUINT16(int val)
                 throws java.io.IOException
writes an unsigned 16-bit integer (little endien).

Parameters:
val - the value to write.
Throws:
java.io.IOException

writeUINT8

public void writeUINT8(int val)
                throws java.io.IOException
writes an unsigned 8-bit integer.

Parameters:
val - the value to write.
Throws:
java.io.IOException

getCount

public long getCount()
gets the count of bytes written.

Returns:
the count of bytes written.

write

public void write(int b)
           throws java.io.IOException

Overrides:
write in class java.io.FilterOutputStream
Throws:
java.io.IOException


Copyright © 2006 null. All Rights Reserved.