jjdh API

dh.java.io
Class ByteBufferOutputStream

java.lang.Object
  extended by java.io.OutputStream
      extended by dh.java.io.ByteBufferOutputStream
All Implemented Interfaces:
Closeable, Flushable

public class ByteBufferOutputStream
extends OutputStream


Field Summary
protected  ByteBuffer buffer
           
protected  int count
           
 
Constructor Summary
ByteBufferOutputStream()
           
ByteBufferOutputStream(int size)
           
 
Method Summary
 void close()
           
 void reset()
           
 int size()
           
 ByteBuffer toByteBuffer()
           
 void write(byte[] b, int off, int len)
           
 void write(int b)
           
 
Methods inherited from class java.io.OutputStream
flush, write
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

buffer

protected ByteBuffer buffer

count

protected int count
Constructor Detail

ByteBufferOutputStream

public ByteBufferOutputStream()

ByteBufferOutputStream

public ByteBufferOutputStream(int size)
Method Detail

write

public void write(int b)
Specified by:
write in class OutputStream

write

public void write(byte[] b,
                  int off,
                  int len)
Overrides:
write in class OutputStream

reset

public void reset()

toByteBuffer

public ByteBuffer toByteBuffer()

size

public int size()

close

public void close()
           throws IOException
Specified by:
close in interface Closeable
Overrides:
close in class OutputStream
Throws:
IOException

jjdh API

Copyright © 2006 Jonas Jacobi and Dennis Heidsiek. All Rights Reserved.