XNIO API 3.0.4.GA

org.xnio.streams
Interface BufferPipeInputStream.InputHandler

All Superinterfaces:
Closeable
Enclosing class:
BufferPipeInputStream

public static interface BufferPipeInputStream.InputHandler
extends Closeable

A handler for events relating to the consumption of data from a BufferPipeInputStream instance.


Method Summary
 void acknowledge(Pooled<ByteBuffer> pooled)
          Acknowledges the successful processing of an input buffer.
 void close()
          Signifies that the user of the enclosing BufferPipeInputStream has called the close() method explicitly.
 

Method Detail

acknowledge

void acknowledge(Pooled<ByteBuffer> pooled)
                 throws 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:
IOException - if an I/O error occurs sending the acknowledgement

close

void close()
           throws IOException
Signifies that the user of the enclosing BufferPipeInputStream has called the close() method explicitly. Any thrown exception is propagated up to the caller of NioByteInput.close().

Specified by:
close in interface Closeable
Throws:
IOException - if an I/O error occurs

XNIO API 3.0.4.GA

Copyright © 2010 JBoss, a division of Red Hat, Inc.