com.caucho.portal.generic
Class BufferFactoryImpl

java.lang.Object
  extended by com.caucho.portal.generic.BufferFactoryImpl
All Implemented Interfaces:
BufferFactory

public class BufferFactoryImpl
extends java.lang.Object
implements BufferFactory


Field Summary
protected static java.util.logging.Logger log
           
 
Constructor Summary
BufferFactoryImpl()
           
 
Method Summary
 PortletByteBuffer allocateByteBuffer(int capacity)
          size indicates a minimum size for the buffer.
 PortletCharBuffer allocateCharBuffer(int capacity)
          size indicates a minimum size for the buffer.
 int getDefaultBufferSize()
          Return the size that will be used if BufferFactory.allocateCharBuffer(int) or BufferFactory.allocateByteBuffer(int) * is called with a size of -1.
 void setBufferSize(int bufferSize)
           
 void setPoolSize(int poolSize)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

log

protected static final java.util.logging.Logger log
Constructor Detail

BufferFactoryImpl

public BufferFactoryImpl()
Method Detail

setBufferSize

public void setBufferSize(int bufferSize)

setPoolSize

public void setPoolSize(int poolSize)

getDefaultBufferSize

public int getDefaultBufferSize()
Description copied from interface: BufferFactory
Return the size that will be used if BufferFactory.allocateCharBuffer(int) or BufferFactory.allocateByteBuffer(int) * is called with a size of -1.

Specified by:
getDefaultBufferSize in interface BufferFactory

allocateCharBuffer

public PortletCharBuffer allocateCharBuffer(int capacity)
Description copied from interface: BufferFactory
size indicates a minimum size for the buffer. A size of -1 indicates that a default size should be used. A size of Integer.MAX_VALUE indicates that a buffer as large as possible should be used.

Specified by:
allocateCharBuffer in interface BufferFactory

allocateByteBuffer

public PortletByteBuffer allocateByteBuffer(int capacity)
Description copied from interface: BufferFactory
size indicates a minimum size for the buffer. A size of -1 indicates that a default size should be used. A size of Integer.MAX_VALUE indicates that a buffer as large as possible should be used.

Specified by:
allocateByteBuffer in interface BufferFactory