Package org.apache.tomcat.util.net
Interface ApplicationBufferHandler
- All Known Implementing Classes:
BufferedInputFilter,ChunkedInputFilter,Http11InputBuffer,IdentityInputFilter,InputBuffer,UpgradeApplicationBufferHandler
public interface ApplicationBufferHandler
Callback interface to be able to expand buffers when buffer overflow exceptions happen or to replace buffers
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final ApplicationBufferHandlerNo-op implementation of the buffer handler.static final ByteBufferEmpty byte buffer constant. -
Method Summary
Modifier and TypeMethodDescriptionvoidexpand(int size) Expand the byte buffer to at least the given size.Returns the current byte buffer.voidsetByteBuffer(ByteBuffer buffer) Set the byte buffer.
-
Field Details
-
EMPTY_BUFFER
Empty byte buffer constant. -
EMPTY
No-op implementation of the buffer handler.
-
-
Method Details
-
setByteBuffer
Set the byte buffer.- Parameters:
buffer- the byte buffer
-
getByteBuffer
ByteBuffer getByteBuffer()Returns the current byte buffer.- Returns:
- the byte buffer
-
expand
void expand(int size) Expand the byte buffer to at least the given size. Some implementations may not implement this.- Parameters:
size- the desired size
-