Package com.luciad.io

Class TLcdInputStreamUtil

java.lang.Object
com.luciad.io.TLcdInputStreamUtil

public class TLcdInputStreamUtil extends Object
This class regroups some methods for skipping or reading a sequence of bytes in an InputStream.
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    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.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • 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 is true 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 either 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.
      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.
      Returns true if tracing is enabled for this class.
      Returns:
      true if tracing is enabled for this class, false otherwise.
    • skipAll

      public static void skipAll(InputStream aInputStream, long aCount) throws IOException
      Skips a given number of bytes from a given InputStream.
      Parameters:
      aInputStream - the InputStream that is being read.
      aCount - the number of bytes to be skipped.
      Throws:
      IOException - when skipping bytes in the InputStream fails.
    • readFully

      public static void readFully(InputStream aInputStream, byte[] aBuffer) throws IOException
      Reads bytes from a given InputStream until the given byte buffer is full.
      Parameters:
      aInputStream - the InputStream 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 - 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.
      Throws:
      IOException - when reading bytes from the InputStream fails.