Package org.xnio.streams
Interface BufferPipeInputStream.InputHandler
- All Superinterfaces:
AutoCloseable
,Closeable
- Enclosing class:
- BufferPipeInputStream
A handler for events relating to the consumption of data from a
BufferPipeInputStream
instance.-
Method Summary
Modifier and TypeMethodDescriptionvoid
acknowledge
(Pooled<ByteBuffer> pooled) Acknowledges the successful processing of an input buffer.void
close()
Signifies that the user of the enclosingBufferPipeInputStream
has called theclose()
method explicitly.
-
Method Details
-
acknowledge
Acknowledges the successful processing of an input buffer. Though this method may throw an exception, it is not acted upon. The acknowledged resource is passed in, with its position set to the number of bytes consumed.- Parameters:
pooled
- the pooled resource which was consumed- Throws:
IOException
- if an I/O error occurs sending the acknowledgement
-
close
Signifies that the user of the enclosingBufferPipeInputStream
has called theclose()
method explicitly. Any thrown exception is propagated up to the caller ofNioByteInput.close()
.- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
- Throws:
IOException
- if an I/O error occurs
-