Top Description Methods
org.glassfish.grizzly.http.io

public Interface BinaryNIOInputSource

extends InputSource
Known Direct Implementers
org.glassfish.grizzly.http.io.NIOInputStream
Imports
org.glassfish.grizzly.Buffer, .InputSource

Adds the ability for binary based org.glassfish.grizzly.InputSources to obtain the incoming org.glassfish.grizzly.Buffer directly without having to use intermediate objects to copy the data to.
Since
2.0

Method Summary

Modifier and TypeMethod and Description
public Buffer

Returns:

the duplicate of the underlying org.glassfish.grizzly.Buffer that backs this InputSource.
getBuffer
()

Returns the the duplicate of the underlying org.glassfish.grizzly.Buffer that backs this InputSource.

public Buffer

Returns:

the underlying org.glassfish.grizzly.Buffer that backs this InputSource.
readBuffer
()

Returns the underlying org.glassfish.grizzly.Buffer that backs this InputSource.

public Buffer

Returns:

the Buffer of a given size, which represents a chunk of the underlying Buffer which contains incoming request data. This method detaches the returned Buffer, so user code becomes responsible for handling its life-cycle.
readBuffer
(int
the requested size of the Buffer to be returned.
size
)

Returns the org.glassfish.grizzly.Buffer of a given size, which represents a chunk of the underlying org.glassfish.grizzly.Buffer that backs this InputSource.

Inherited from org.glassfish.grizzly.InputSource:
isFinishedisReadynotifyAvailablenotifyAvailablereadyData

Method Detail

getBufferback to summary
public Buffer getBuffer()

Returns the the duplicate of the underlying org.glassfish.grizzly.Buffer that backs this InputSource. The content of the returned buffer will be that of the underlying buffer. Changes to returned buffer's content will be visible in the underlying buffer, and vice versa; the two buffers' position, limit, and mark values will be independent.

Returns:Buffer

the duplicate of the underlying org.glassfish.grizzly.Buffer that backs this InputSource.

readBufferback to summary
public Buffer readBuffer()

Returns the underlying org.glassfish.grizzly.Buffer that backs this InputSource. Unlike getBuffer(), this method detaches the returned Buffer, so user becomes responsible for handling the Buffer's life-cycle.

Returns:Buffer

the underlying org.glassfish.grizzly.Buffer that backs this InputSource.

readBufferback to summary
public Buffer readBuffer(int size)

Returns the org.glassfish.grizzly.Buffer of a given size, which represents a chunk of the underlying org.glassfish.grizzly.Buffer that backs this InputSource. Unlike getBuffer(), this method detaches the returned Buffer, so user becomes responsible for handling the Buffer's life-cycle.

Parameters
size:int

the requested size of the Buffer to be returned.

Returns:Buffer

the Buffer of a given size, which represents a chunk of the underlying Buffer which contains incoming request data. This method detaches the returned Buffer, so user code becomes responsible for handling its life-cycle.