org.glassfish.grizzly.memory
Class CompositeBuffer

java.lang.Object
  extended by org.glassfish.grizzly.memory.CompositeBuffer
All Implemented Interfaces:
Comparable<Buffer>, Appendable<Buffer>, Buffer
Direct Known Subclasses:
BuffersBuffer

public abstract class CompositeBuffer
extends Object
implements Buffer, Appendable<Buffer>

Author:
Alexey Stashok

Constructor Summary
CompositeBuffer()
           
 
Method Summary
abstract  boolean allowInternalBuffersDispose()
           
abstract  void allowInternalBuffersDispose(boolean allow)
           
static CompositeBuffer newBuffer()
          Construct CompositeBuffer.
static CompositeBuffer newBuffer(MemoryManager memoryManager)
           
static CompositeBuffer newBuffer(MemoryManager memoryManager, Buffer... buffers)
           
static CompositeBuffer newBuffer(MemoryManager memoryManager, Buffer[] buffers, boolean isReadOnly)
           
abstract  CompositeBuffer prepend(Buffer buffer)
          Prepend data from header.position() to header.limit() to the current buffer.
abstract  void removeAll()
          Removes underlying Buffers, without disposing
abstract  Object[] underlying()
          Return the underlying buffer
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.glassfish.grizzly.Buffer
allowBufferDispose, allowBufferDispose, asReadOnlyBuffer, capacity, clear, compact, dispose, duplicate, flip, get, get, get, get, get, get, getChar, getChar, getDouble, getDouble, getFloat, getFloat, getInt, getInt, getLong, getLong, getShort, getShort, hasRemaining, isComposite, isDirect, isReadOnly, limit, limit, mark, order, order, position, position, put, put, put, put, put, put, put, put, putChar, putChar, putDouble, putDouble, putFloat, putFloat, putInt, putInt, putLong, putLong, putShort, putShort, remaining, reset, rewind, shrink, slice, slice, split, toBufferArray, toBufferArray, toBufferArray, toBufferArray, toByteBuffer, toByteBuffer, toByteBufferArray, toByteBufferArray, toByteBufferArray, toByteBufferArray, toStringContent, toStringContent, toStringContent, trim, tryDispose
 
Methods inherited from interface java.lang.Comparable
compareTo
 
Methods inherited from interface org.glassfish.grizzly.Appendable
append
 

Constructor Detail

CompositeBuffer

public CompositeBuffer()
Method Detail

newBuffer

public static CompositeBuffer newBuffer()
Construct CompositeBuffer.


newBuffer

public static CompositeBuffer newBuffer(MemoryManager memoryManager)

newBuffer

public static CompositeBuffer newBuffer(MemoryManager memoryManager,
                                        Buffer... buffers)

newBuffer

public static CompositeBuffer newBuffer(MemoryManager memoryManager,
                                        Buffer[] buffers,
                                        boolean isReadOnly)

prepend

public abstract CompositeBuffer prepend(Buffer buffer)
Description copied from interface: Buffer
Prepend data from header.position() to header.limit() to the current buffer. This will change the value returned by buffer()!

Specified by:
prepend in interface Buffer

underlying

public abstract Object[] underlying()
Description copied from interface: Buffer
Return the underlying buffer

Specified by:
underlying in interface Buffer
Returns:
the underlying buffer

removeAll

public abstract void removeAll()
Removes underlying Buffers, without disposing


allowInternalBuffersDispose

public abstract void allowInternalBuffersDispose(boolean allow)

allowInternalBuffersDispose

public abstract boolean allowInternalBuffersDispose()


Copyright © 2011 Oracle Corpration. All Rights Reserved.