to.etc.util
Class ByteBufferOutputStream
java.lang.Object
java.io.OutputStream
to.etc.util.ByteBufferOutputStream
- All Implemented Interfaces:
- java.io.Closeable, java.io.Flushable
public class ByteBufferOutputStream
- extends java.io.OutputStream
This is a streamer class which accepts data and writes this data into an
array of fixed-size buffers. At the end of the write the array of buffers can
be gotten from the instance.
- Author:
- Frits Jalvingh
Method Summary |
void |
close()
|
byte[][] |
getBuffers()
Returns the buffer table for the write. |
int |
getSize()
|
void |
write(byte[] parm1)
|
void |
write(byte[] odata,
int ooff,
int osz)
|
void |
write(int b)
|
Methods inherited from class java.io.OutputStream |
flush |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ByteBufferOutputStream
public ByteBufferOutputStream()
ByteBufferOutputStream
public ByteBufferOutputStream(int bufsz)
write
public void write(byte[] odata,
int ooff,
int osz)
throws java.io.IOException
- Overrides:
write
in class java.io.OutputStream
- Throws:
java.io.IOException
write
public void write(byte[] parm1)
throws java.io.IOException
- Overrides:
write
in class java.io.OutputStream
- Throws:
java.io.IOException
write
public void write(int b)
throws java.io.IOException
- Specified by:
write
in class java.io.OutputStream
- Throws:
java.io.IOException
close
public void close()
throws java.io.IOException
- Specified by:
close
in interface java.io.Closeable
- Overrides:
close
in class java.io.OutputStream
- Throws:
java.io.IOException
getBuffers
public byte[][] getBuffers()
- Returns the buffer table for the write.
- Returns:
getSize
public int getSize()