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 Retainable
Retainable.ReferenceCounter, Retainable.WrapperNested classes/interfaces inherited from interface RetainableByteBuffer
RetainableByteBuffer.Wrapper -
Field Summary
Fields inherited from interface RetainableByteBuffer
EMPTY -
Constructor Summary
Constructors -
Method Summary
Methods inherited from class Retainable.Wrapper
canRetain, release, retain, toStringMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface Retainable
canRetain, release, retain
-
Constructor Details
-
Wrapper
-
-
Method Details
-
getWrapped
- Overrides:
getWrappedin classRetainable.Wrapper
-
isRetained
public boolean isRetained()- Specified by:
isRetainedin interfaceRetainableByteBuffer- Returns:
- whether this instance is retained
- See Also:
-
getByteBuffer
Description copied from interface:RetainableByteBufferGet the wrapped, notnull,ByteBuffer.- Specified by:
getByteBufferin interfaceRetainableByteBuffer- Returns:
- the wrapped, not
null,ByteBuffer
-
isDirect
public boolean isDirect()- Specified by:
isDirectin interfaceRetainableByteBuffer- Returns:
- whether the
ByteBufferis direct
-
remaining
public int remaining()- Specified by:
remainingin interfaceRetainableByteBuffer- Returns:
- the number of remaining bytes in the
ByteBuffer
-
hasRemaining
public boolean hasRemaining()- Specified by:
hasRemainingin interfaceRetainableByteBuffer- Returns:
- whether the
ByteBufferhas remaining bytes
-
capacity
public int capacity()- Specified by:
capacityin interfaceRetainableByteBuffer- Returns:
- the
ByteBuffercapacity
-
clear
public void clear()- Specified by:
clearin interfaceRetainableByteBuffer- See Also:
-