public class TLcdInputStreamUtil extends Object
InputStream
.Constructor and Description |
---|
TLcdInputStreamUtil() |
Modifier and Type | Method and Description |
---|---|
boolean |
isTraceOn()
Deprecated.
This method has been deprecated. It is recommended to use the
standard Java logging framework directly.
|
static void |
readFully(InputStream aInputStream,
byte[] aBuffer)
Reads bytes from a given InputStream until the given byte buffer is full.
|
static void |
readFully(InputStream aInputStream,
byte[] aBuffer,
int aOffset,
int aCount)
Reads a given number of bytes from a given InputStream and writes them to
an array.
|
static void |
setClassTraceOn(boolean aClassTraceOn)
Deprecated.
This method has been deprecated. It is recommended to use the
standard Java logging framework directly.
|
void |
setTraceOn(boolean aTraceOn)
Deprecated.
This method has been deprecated. It is recommended to use the
standard Java logging framework directly.
|
static void |
skipAll(InputStream aInputStream,
long aCount)
Skips a given number of bytes from a given InputStream.
|
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 static void skipAll(InputStream aInputStream, long aCount) throws IOException
aInputStream
- the InputStream
that is being read.aCount
- the number of bytes to be skipped.IOException
- when skipping bytes in the InputStream fails.public static void readFully(InputStream aInputStream, byte[] aBuffer) throws IOException
aInputStream
- the InputStream
that is being read.aBuffer
- the array to which the bytes will be written.IOException
- when reading bytes from the InputStream fails.public static void readFully(InputStream aInputStream, byte[] aBuffer, int aOffset, int aCount) throws IOException
aInputStream
- the InputStream
that is being read.aBuffer
- the array to which the bytes will be written.aOffset
- the index of the first byte in the array.aCount
- the number of bytes to be read.IOException
- when reading bytes from the InputStream fails.