Package org.jibx.runtime.impl
Interface IInByteBuffer
- All Superinterfaces:
IByteBuffer
- All Known Implementing Classes:
InByteBuffer
Input buffer interface. This extends the basic byte array buffer interface
with methods specifically for input. Client code needs to obey the access
rules stated in the method documentation, including the documentation for the
base interface methods.
- Author:
- Dennis M. Sosnoski
-
Method Summary
Methods inherited from interface org.jibx.runtime.impl.IByteBuffer
finish, getBuffer, getOffset, setOffset
-
Method Details
-
require
Require some number of bytes of data. When this call is made the buffer can discard all data up to the current offset, and may move retained data within the buffer array and read more data from the data source to make the requested number of bytes available. This call may cause the byte array buffer to be replaced, soIByteBuffer.getBuffer()
,getLimit()
, andIByteBuffer.getOffset()
must all be called again before any further use of the buffer.- Parameters:
size
- desired number of bytes- Returns:
true
if request satisfied,false
if end with less than request available- Throws:
IOException
-
getLimit
int getLimit()Get offset past the end of data in buffer.- Returns:
- offset past end of data
-