-
- All Superinterfaces:
java.lang.AutoCloseable
,java.io.Closeable
- Enclosing class:
- BufferPipeInputStream
public static interface BufferPipeInputStream.InputHandler extends java.io.Closeable
A handler for events relating to the consumption of data from aBufferPipeInputStream
instance.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
acknowledge(Pooled<java.nio.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 Detail
-
acknowledge
void acknowledge(Pooled<java.nio.ByteBuffer> pooled) throws java.io.IOException
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:
java.io.IOException
- if an I/O error occurs sending the acknowledgement
-
close
void close() throws java.io.IOException
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 interfacejava.lang.AutoCloseable
- Specified by:
close
in interfacejava.io.Closeable
- Throws:
java.io.IOException
- if an I/O error occurs
-
-