Package org.eclipse.jetty.io
Class RetainableByteBuffer.Wrapper
java.lang.Object
org.eclipse.jetty.io.Retainable.Wrapper
org.eclipse.jetty.io.RetainableByteBuffer.Wrapper
- All Implemented Interfaces:
Retainable
,RetainableByteBuffer
- Direct Known Subclasses:
ArrayByteBufferPool.Tracking.Buffer
- Enclosing interface:
- RetainableByteBuffer
public static class RetainableByteBuffer.Wrapper
extends Retainable.Wrapper
implements RetainableByteBuffer
A wrapper for
RetainableByteBuffer
instances-
Nested Class Summary
Nested classes/interfaces inherited from interface org.eclipse.jetty.io.Retainable
Retainable.ReferenceCounter, Retainable.Wrapper
Nested classes/interfaces inherited from interface org.eclipse.jetty.io.RetainableByteBuffer
RetainableByteBuffer.Wrapper
-
Field Summary
Fields inherited from interface org.eclipse.jetty.io.RetainableByteBuffer
EMPTY
-
Constructor Summary
-
Method Summary
Methods inherited from class org.eclipse.jetty.io.Retainable.Wrapper
canRetain, release, retain, 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.Retainable
canRetain, release, retain
-
Constructor Details
-
Wrapper
-
-
Method Details
-
getWrapped
- Overrides:
getWrapped
in classRetainable.Wrapper
-
isRetained
public boolean isRetained()- Specified by:
isRetained
in interfaceRetainableByteBuffer
- Returns:
- whether this instance is retained
- See Also:
-
getByteBuffer
Description copied from interface:RetainableByteBuffer
Get the wrapped, notnull
,ByteBuffer
.- Specified by:
getByteBuffer
in interfaceRetainableByteBuffer
- Returns:
- the wrapped, not
null
,ByteBuffer
-
isDirect
public boolean isDirect()- Specified by:
isDirect
in interfaceRetainableByteBuffer
- Returns:
- whether the
ByteBuffer
is direct
-
remaining
public int remaining()- Specified by:
remaining
in interfaceRetainableByteBuffer
- Returns:
- the number of remaining bytes in the
ByteBuffer
-
hasRemaining
public boolean hasRemaining()- Specified by:
hasRemaining
in interfaceRetainableByteBuffer
- Returns:
- whether the
ByteBuffer
has remaining bytes
-
capacity
public int capacity()- Specified by:
capacity
in interfaceRetainableByteBuffer
- Returns:
- the
ByteBuffer
capacity
-
clear
public void clear()- Specified by:
clear
in interfaceRetainableByteBuffer
- See Also:
-