Package org.jibx.runtime.impl
Interface IInByteBuffer
-
- All Superinterfaces:
IByteBuffer
- All Known Implementing Classes:
InByteBuffer
public interface IInByteBuffer extends IByteBuffer
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
All Methods Instance Methods Abstract Methods Modifier and Type Method Description int
getLimit()
Get offset past the end of data in buffer.boolean
require(int size)
Require some number of bytes of data.-
Methods inherited from interface org.jibx.runtime.impl.IByteBuffer
finish, getBuffer, getOffset, setOffset
-
-
-
-
Method Detail
-
require
boolean require(int size) throws java.io.IOException
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:
java.io.IOException
-
getLimit
int getLimit()
Get offset past the end of data in buffer.- Returns:
- offset past end of data
-
-