java.lang.Object | +--org.apache.commons.collections.BufferUtils
static Buffer | An empty unmodifiable buffer. |
BufferUtils should not normally be instantiated. |
static Buffer | blockingBuffer(Buffer buffer) Returns a synchronized buffer backed by the given buffer that will block on Buffer#get() and Buffer#remove() operations. |
static Buffer | predicatedBuffer(Buffer buffer, Predicate predicate) Returns a predicated buffer backed by the given buffer. |
static Buffer | synchronizedBuffer(Buffer buffer) Returns a synchronized buffer backed by the given buffer. |
static Buffer | transformedBuffer(Buffer buffer, Transformer transformer) Returns a transformed buffer backed by the given buffer. |
static Buffer | typedBuffer(Buffer buffer, Class type) Returns a typed buffer backed by the given buffer. |
static Buffer | unmodifiableBuffer(Buffer buffer) Returns an unmodifiable buffer backed by the given buffer. |
public static final Buffer EMPTY_BUFFER
public BufferUtils()
BufferUtils
should not normally be instantiated.
public static Buffer blockingBuffer(Buffer buffer)
BufferUnderflowException
.
- if the Buffer is nullpublic static Buffer predicatedBuffer(Buffer buffer, Predicate predicate)
- if the Buffer or Predicate is nullpublic static Buffer synchronizedBuffer(Buffer buffer)
Buffer b = BufferUtils.synchronizedBuffer(myBuffer); synchronized (b) { Iterator i = b.iterator(); while (i.hasNext()) { process (i.next()); } }
- if the Buffer is nullpublic static Buffer transformedBuffer(Buffer buffer, Transformer transformer)
- if the Buffer or Transformer is nullpublic static Buffer typedBuffer(Buffer buffer, Class type)
- if the buffer or type is nullpublic static Buffer unmodifiableBuffer(Buffer buffer)
- if the Buffer is null