org.eclipse.jetty.io
Class AbstractBuffers

java.lang.Object
  extended by org.eclipse.jetty.io.AbstractBuffers
All Implemented Interfaces:
Buffers
Direct Known Subclasses:
PooledBuffers, ThreadLocalBuffers

public abstract class AbstractBuffers
extends Object
implements Buffers


Nested Class Summary
 
Nested classes/interfaces inherited from interface org.eclipse.jetty.io.Buffers
Buffers.Type
 
Field Summary
protected  int _bufferSize
           
protected  Buffers.Type _bufferType
           
protected  int _headerSize
           
protected  Buffers.Type _headerType
           
protected  Buffers.Type _otherType
           
 
Constructor Summary
AbstractBuffers(Buffers.Type headerType, int headerSize, Buffers.Type bufferType, int bufferSize, Buffers.Type otherType)
           
 
Method Summary
 int getBufferSize()
           
 int getHeaderSize()
           
 boolean isBuffer(Buffer buffer)
           
 boolean isHeader(Buffer buffer)
           
protected  Buffer newBuffer()
          Create a new content Buffer
protected  Buffer newBuffer(int size)
          Create a new content Buffer
protected  Buffer newHeader()
          Create a new header Buffer
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.eclipse.jetty.io.Buffers
getBuffer, getBuffer, getHeader, returnBuffer
 

Field Detail

_headerType

protected final Buffers.Type _headerType

_headerSize

protected final int _headerSize

_bufferType

protected final Buffers.Type _bufferType

_bufferSize

protected final int _bufferSize

_otherType

protected final Buffers.Type _otherType
Constructor Detail

AbstractBuffers

public AbstractBuffers(Buffers.Type headerType,
                       int headerSize,
                       Buffers.Type bufferType,
                       int bufferSize,
                       Buffers.Type otherType)
Method Detail

getBufferSize

public int getBufferSize()
Returns:
Returns the buffer size in bytes.

getHeaderSize

public int getHeaderSize()
Returns:
Returns the header size in bytes.

newHeader

protected final Buffer newHeader()
Create a new header Buffer

Parameters:
size -
Returns:
new Buffer

newBuffer

protected final Buffer newBuffer()
Create a new content Buffer

Parameters:
size -
Returns:
new Buffer

newBuffer

protected final Buffer newBuffer(int size)
Create a new content Buffer

Parameters:
size -
Returns:
new Buffer

isHeader

public final boolean isHeader(Buffer buffer)
Parameters:
buffer -
Returns:
True if the buffer is the correct type to be a Header buffer

isBuffer

public final boolean isBuffer(Buffer buffer)
Parameters:
buffer -
Returns:
True if the buffer is the correct type to be a Header buffer


Copyright © 1995-2011 Mort Bay Consulting. All Rights Reserved.