org.glassfish.grizzly.http.server.io
Interface BinaryNIOInputSource

All Superinterfaces:
NIOInputSource
All Known Implementing Classes:
NIOInputStream

public interface BinaryNIOInputSource
extends NIOInputSource

Adds the ability for binary based NIOInputSources to obtain the incoming Buffer directly without having to use intermediate objects to copy the data to.

Since:
2.0

Method Summary
 Buffer getBuffer()
           Returns the underlying Buffer that backs this NIOInputSource.
 Buffer readBuffer()
           Returns the underlying Buffer that backs this NIOInputSource.
 
Methods inherited from interface org.glassfish.grizzly.http.server.io.NIOInputSource
isFinished, isReady, notifyAvailable, notifyAvailable, readyData
 

Method Detail

getBuffer

Buffer getBuffer()

Returns the underlying Buffer that backs this NIOInputSource.

Returns:
the underlying Buffer that backs this NIOInputSource.

readBuffer

Buffer readBuffer()

Returns the underlying Buffer that backs this NIOInputSource. Unlike getBuffer(), this method detaches the returned Buffer, so user becomes responsible for handling the Buffer life-cycle.

Returns:
the underlying Buffer that backs this NIOInputSource.


Copyright © 2011 Oracle Corpration. All Rights Reserved.