org.sitemesh.webapp.contentfilter.io
Class ByteBufferBuilder

java.lang.Object
  extended by org.sitemesh.webapp.contentfilter.io.ByteBufferBuilder

public class ByteBufferBuilder
extends Object

A speedy implementation of ByteArrayOutputStream. It's not synchronized, and it does not copy buffers when it's expanded.

Author:
Rickard Öberg, Scott Farquhar

Constructor Summary
ByteBufferBuilder()
           
ByteBufferBuilder(int aSize)
           
 
Method Summary
 int size()
           
 ByteBuffer toByteBuffer()
           
 String toString()
           
 void write(byte[] data, int offset, int length)
           
 void write(int datum)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ByteBufferBuilder

public ByteBufferBuilder()

ByteBufferBuilder

public ByteBufferBuilder(int aSize)
Method Detail

size

public int size()

toByteBuffer

public ByteBuffer toByteBuffer()

write

public void write(int datum)

write

public void write(byte[] data,
                  int offset,
                  int length)

toString

public String toString()
Overrides:
toString in class Object


Copyright © 2011. All Rights Reserved.