public interface ILcdBufferSegment
ILcdBufferSegment
defines a segment of an ILcdBuffer
.
A segment is specified by the index of its first byte and by its size, expressed
in bytes.ILcdBuffer
Modifier and Type | Method and Description |
---|---|
boolean |
enlarge(int aNumberOfBytes)
Returns if the buffer segment could be enlarged with the specified size.
|
ILcdBuffer |
getBuffer()
Returns the
ILcdBuffer to which this ILcdBufferSegment
is associated. |
int |
getOffset()
Returns the index of the first byte of this
ILcdBufferSegment
in its ILcdBuffer , or -1 if no bytes are allocated. |
int |
getSize()
Returns the number of bytes occupied by this
ILcdBufferSegment
in its ILcdBuffer . |
boolean |
isValid()
Returns if the buffer segment is still valid.
|
ILcdBuffer getBuffer()
ILcdBuffer
to which this ILcdBufferSegment
is associated.ILcdBuffer
to which this ILcdBufferSegment
is associated.int getOffset()
ILcdBufferSegment
in its ILcdBuffer
, or -1 if no bytes are allocated.ILcdBufferSegment
in its ILcdBuffer
, or -1 if no bytes are allocated.int getSize()
ILcdBufferSegment
in its ILcdBuffer
.ILcdBufferSegment
in its ILcdBuffer
. Note that the buffer may have invalidated this
ILcdBufferSegment to make space for other segments. In that case, 0 will
be returned.boolean isValid()
boolean enlarge(int aNumberOfBytes)
aNumberOfBytes
- the number of bytes to enlarge the buffer segment with
if possible. Calling this method should only be done on the
last allocated ILcdBufferSegment
.
Note that the offset can be changed as a result.aNumberOfBytes
bytes.