public class TLcdBuffer extends Object implements ILcdBuffer
ILcdBuffer
.Constructor and Description |
---|
TLcdBuffer(int aSize)
Creates a new
TLcdBuffer capable of storing a given number of bytes. |
Modifier and Type | Method and Description |
---|---|
ILcdBufferSegment |
allocateBufferSegment(int aSize)
Allocates a given number of bytes in this ILcdBuffer.
|
byte[] |
getByte()
Returns the bytes in this ILcdBuffer.
|
int |
getSize()
Returns the number of bytes in the buffer.
|
boolean |
isAllocateFullBufferSize()
Returns whether the buffer will be allocated with its maximum size
or progressively.
|
boolean |
isTraceOn()
Deprecated.
This method has been deprecated. It is recommended to use the
standard Java logging framework directly.
|
void |
releaseMemory()
Release the memory used by this
TLcdBuffer . |
void |
releaseMemory(int aSize)
Release the memory used by this
TLcdBuffer
reducing its current usage to a maximum of aSize bytes. |
void |
setAllocateFullBufferSize(boolean aAllocateFullBufferSize)
Sets whether the buffer will be allocated with its maximum size
or progressively.
|
static void |
setClassTraceOn(boolean aClassTraceOn)
Deprecated.
This method has been deprecated. It is recommended to use the
standard Java logging framework directly.
|
void |
setSize(int aSize)
Sets the maximum size of this buffer (in bytes).
|
void |
setTraceOn(boolean aTraceOn)
Deprecated.
This method has been deprecated. It is recommended to use the
standard Java logging framework directly.
|
public TLcdBuffer(int aSize)
TLcdBuffer
capable of storing a given number of bytes.aSize
- the size of the buffer, expressed in bytes.public static void setClassTraceOn(boolean aClassTraceOn)
true
then all log messages are recorded, otherwise only
the informative, warning and error messages are recorded.aClassTraceOn
- if true then all log messages are recorded,
otherwise only the informative, warning and error messages are recorded.public void setTraceOn(boolean aTraceOn)
true
or false
as argument automatically turns
off tracing for all other class instances for which
setTraceOn
has not been called.
If the argument is false
then only the informative, warning
and error log messages are recorded.aTraceOn
- if true then all log messages are recorded for this
instance. If false, then only the informative, warning and
error log messages are recorded.public boolean isTraceOn()
true
if tracing is enabled for this class.public int getSize()
ILcdBuffer
getSize
in interface ILcdBuffer
public void setSize(int aSize)
aSize
- the size of the buffer (in bytes).getSize()
public void setAllocateFullBufferSize(boolean aAllocateFullBufferSize)
aAllocateFullBufferSize
- the new value for the property allocateFullBufferSize
.isAllocateFullBufferSize()
public boolean isAllocateFullBufferSize()
setAllocateFullBufferSize(boolean)
public byte[] getByte()
ILcdBuffer
getByte
in interface ILcdBuffer
public ILcdBufferSegment allocateBufferSegment(int aSize) throws IllegalArgumentException
ILcdBuffer
allocateBufferSegment
in interface ILcdBuffer
aSize
- the number of bytes to be allocated. It must not be larger
than the total buffer size.IllegalArgumentException
- when the requested number of bytes is larger
than the full buffer size.public void releaseMemory()
TLcdBuffer
.public void releaseMemory(int aSize)
TLcdBuffer
reducing its current usage to a maximum of aSize
bytes.aSize
- the memory usage of the buffer after this method has been called (expressed in bytes).