Package com.luciad.io
Class TLcdInputStreamUtil
java.lang.Object
com.luciad.io.TLcdInputStreamUtil
This class regroups some methods for skipping or reading a sequence of bytes
in an
InputStream
.-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
Deprecated.This method has been deprecated.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.void
setTraceOn
(boolean aTraceOn) Deprecated.This method has been deprecated.static void
skipAll
(InputStream aInputStream, long aCount) Skips a given number of bytes from a given InputStream.
-
Constructor Details
-
TLcdInputStreamUtil
public TLcdInputStreamUtil()
-
-
Method Details
-
setClassTraceOn
public static void setClassTraceOn(boolean aClassTraceOn) Deprecated.This method has been deprecated. It is recommended to use the standard Java logging framework directly.Enables tracing for all instances of this class. If the argument istrue
then all log messages are recorded, otherwise only the informative, warning and error messages are recorded.- Parameters:
aClassTraceOn
- if true then all log messages are recorded, otherwise only the informative, warning and error messages are recorded.
-
setTraceOn
public void setTraceOn(boolean aTraceOn) Deprecated.This method has been deprecated. It is recommended to use the standard Java logging framework directly.Enables tracing for this class instance. Calling this method with eithertrue
orfalse
as argument automatically turns off tracing for all other class instances for whichsetTraceOn
has not been called. If the argument isfalse
then only the informative, warning and error log messages are recorded.- Parameters:
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.
-
isTraceOn
public boolean isTraceOn()Deprecated.This method has been deprecated. It is recommended to use the standard Java logging framework directly.Returnstrue
if tracing is enabled for this class.- Returns:
- true if tracing is enabled for this class, false otherwise.
-
skipAll
Skips a given number of bytes from a given InputStream.- Parameters:
aInputStream
- theInputStream
that is being read.aCount
- the number of bytes to be skipped.- Throws:
IOException
- when skipping bytes in the InputStream fails.
-
readFully
Reads bytes from a given InputStream until the given byte buffer is full.- Parameters:
aInputStream
- theInputStream
that is being read.aBuffer
- the array to which the bytes will be written.- Throws:
IOException
- when reading bytes from the InputStream fails.
-
readFully
public static void readFully(InputStream aInputStream, byte[] aBuffer, int aOffset, int aCount) throws IOException Reads a given number of bytes from a given InputStream and writes them to an array.- Parameters:
aInputStream
- theInputStream
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.- Throws:
IOException
- when reading bytes from the InputStream fails.
-