Top Description Fields Constructors Methods
org.apache.tomcat.util.buf

public Class ByteBufferHolder

extends Object
Class Inheritance
Imports
java.nio.ByteBuffer, java.util.concurrent.atomic.AtomicBoolean

Simple wrapper for a ByteBuffer that remembers if the buffer has been flipped or not.

Field Summary

Modifier and TypeField and Description
private final ByteBuffer
private final AtomicBoolean

Constructor Summary

AccessConstructor and Description
public
ByteBufferHolder(ByteBuffer buf, boolean flipped)

Method Summary

Modifier and TypeMethod and Description
public boolean
flip()

public ByteBuffer
public boolean
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

bufback to summary
private final ByteBuffer buf
flippedback to summary
private final AtomicBoolean flipped

Constructor Detail

ByteBufferHolderback to summary
public ByteBufferHolder(ByteBuffer buf, boolean flipped)

Method Detail

flipback to summary
public boolean flip()
getBufback to summary
public ByteBuffer getBuf()
isFlippedback to summary
public boolean isFlipped()