Package com.luciad.io

Class TLcdDataOutputStream

java.lang.Object
com.luciad.io.TLcdDataOutputStream

public class TLcdDataOutputStream extends Object
This class is similar to a DataOutputStream, except that it can also write little-endian binary data instead of only big-endian data.

The position is incremented before the write operations, so it will be incremented even if the operation fails.

  • Constructor Summary

    Constructors
    Constructor
    Description
    Creates a TLcdDataOutputStream wrapper around a OutputStream allowing to write little-endian mode words to the output stream.
  • Method Summary

    Modifier and Type
    Method
    Description
    final boolean
    Returns true if the numbers written to the stream are written in little endian format.
    final void
    setLittleEndianMode(boolean aFlag)
    Specifies whether numbers written to the stream will be written in little endian format.
    final void
    writeBIDouble(double aDouble)
    Writes a big-endian double.
    final void
    writeBIFloat(float aDouble)
    Writes a big-endian float.
    final void
    writeBIInt(int aInt)
    Writes a big-endian integer.
    void
    writeByte(int aInt)
    Writes a byte to the output stream.
    final void
    writeLIDouble(double aDouble)
    Writes a little-endian double.
    final void
    writeLIFloat(float aDouble)
    Writes a little-endian float.
    final void
    writeLIInt(int aInt)
    Writes a little-endian integer.
    final void
    writeLong(long aLong)
    Writes a long in little or big endian mode depending on the value of the property littleEndianMode.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • TLcdDataOutputStream

      public TLcdDataOutputStream(OutputStream out)
      Creates a TLcdDataOutputStream wrapper around a OutputStream allowing to write little-endian mode words to the output stream.
      Parameters:
      out - the output stream to wrap.
  • Method Details

    • writeBIInt

      public final void writeBIInt(int aInt) throws IOException
      Writes a big-endian integer.
      Parameters:
      aInt - the integer to write.
      Throws:
      IOException - if an I/O error occurs.
    • writeLIInt

      public final void writeLIInt(int aInt) throws IOException
      Writes a little-endian integer.
      Parameters:
      aInt - the integer to write.
      Throws:
      IOException - if an I/O error occurs.
    • writeLong

      public final void writeLong(long aLong) throws IOException
      Writes a long in little or big endian mode depending on the value of the property littleEndianMode.
      Parameters:
      aLong - the long to write.
      Throws:
      IOException - if an I/O error occurs.
    • writeLIFloat

      public final void writeLIFloat(float aDouble) throws IOException
      Writes a little-endian float.
      Parameters:
      aDouble - the float to write.
      Throws:
      IOException - if an I/O error occurs.
      Since:
      2017.1
    • writeBIFloat

      public final void writeBIFloat(float aDouble) throws IOException
      Writes a big-endian float.
      Parameters:
      aDouble - the float to write.
      Throws:
      IOException - if an I/O error occurs.
      Since:
      2017.1
    • writeLIDouble

      public final void writeLIDouble(double aDouble) throws IOException
      Writes a little-endian double.
      Parameters:
      aDouble - the double to write.
      Throws:
      IOException - if an I/O error occurs.
    • writeBIDouble

      public final void writeBIDouble(double aDouble) throws IOException
      Writes a big-endian double.
      Parameters:
      aDouble - the double to write.
      Throws:
      IOException - if an I/O error occurs.
    • writeByte

      public void writeByte(int aInt) throws IOException
      Writes a byte to the output stream.
      Parameters:
      aInt - the byte to write.
      Throws:
      IOException - if an I/O error occurs.
    • setLittleEndianMode

      public final void setLittleEndianMode(boolean aFlag)
      Specifies whether numbers written to the stream will be written in little endian format. In little endian format, the data stream stores the least significant byte first (lowest address) and the most significant byte last (highest address). The default is true.
      Parameters:
      aFlag - true when numbers written to the stream will be written in little endian format.
      Since:
      2018.0
    • isLittleEndianMode

      public final boolean isLittleEndianMode()
      Returns true if the numbers written to the stream are written in little endian format. In little endian format, the data stream stores the least significant byte first (lowest address) and the most significant byte last (highest address).
      Returns:
      true if the numbers written to the stream are written in little endian format.
      Since:
      2018.0