org.eclipse.jetty.io

## Class AbstractBuffers

- java.lang.Object
- - 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

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `protected int` | `_bufferSize`
    `protected Buffers.Type` | `_bufferType`
    `protected int` | `_headerSize`
    `protected Buffers.Type` | `_headerType`
    `protected Buffers.Type` | `_otherType`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `AbstractBuffers(Buffers.Type headerType, int headerSize, Buffers.Type bufferType, int bufferSize, Buffers.Type otherType)`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `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
    `String` | `toString()`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, 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
      Returns:
        new Buffer

    - #### newBuffer

          protected final Buffer newBuffer()

      Create a new content Buffer
      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

    - #### toString

          public String toString()

      Overrides:
        `toString` in class `Object`

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