Class LittleEndianDataOutputStream

  • All Implemented Interfaces:
    java.io.Closeable, java.io.DataOutput, java.io.Flushable, java.lang.AutoCloseable

    @Beta
    @Deprecated(since="2022-12-01")
    public class LittleEndianDataOutputStream
    extends java.io.FilterOutputStream
    implements java.io.DataOutput
    Deprecated.
    The Google Guava Core Libraries are deprecated and will not be part of the AEM SDK after April 2023
    An implementation of DataOutput that uses little-endian byte ordering for writing char, short, int, float, double, and long values.

    Note: This class intentionally violates the specification of its supertype DataOutput, which explicitly requires big-endian byte order.

    Since:
    8.0
    • Constructor Summary

      Constructors 
      Constructor Description
      LittleEndianDataOutputStream​(java.io.OutputStream out)
      Deprecated.
      Creates a LittleEndianDataOutputStream that wraps the given stream.
    • Method Summary

      All Methods Instance Methods Concrete Methods Deprecated Methods 
      Modifier and Type Method Description
      void write​(byte[] b, int off, int len)
      Deprecated.
       
      void writeBoolean​(boolean v)
      Deprecated.
       
      void writeByte​(int v)
      Deprecated.
       
      void writeBytes​(java.lang.String s)
      Deprecated.
      The semantics of writeBytes(String s) are considered dangerous.
      void writeChar​(int v)
      Deprecated.
      Writes a char as specified by DataOutputStream.writeChar(int), except using little-endian byte order.
      void writeChars​(java.lang.String s)
      Deprecated.
      Writes a String as specified by DataOutputStream.writeChars(String), except each character is written using little-endian byte order.
      void writeDouble​(double v)
      Deprecated.
      Writes a double as specified by DataOutputStream.writeDouble(double), except using little-endian byte order.
      void writeFloat​(float v)
      Deprecated.
      Writes a float as specified by DataOutputStream.writeFloat(float), except using little-endian byte order.
      void writeInt​(int v)
      Deprecated.
      Writes an int as specified by DataOutputStream.writeInt(int), except using little-endian byte order.
      void writeLong​(long v)
      Deprecated.
      Writes a long as specified by DataOutputStream.writeLong(long), except using little-endian byte order.
      void writeShort​(int v)
      Deprecated.
      Writes a short as specified by DataOutputStream.writeShort(int), except using little-endian byte order.
      void writeUTF​(java.lang.String str)
      Deprecated.
       
      • Methods inherited from class java.io.FilterOutputStream

        close, flush, write, write
      • Methods inherited from class java.io.OutputStream

        nullOutputStream
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • Methods inherited from interface java.io.DataOutput

        write, write
    • Constructor Detail

      • LittleEndianDataOutputStream

        public LittleEndianDataOutputStream​(java.io.OutputStream out)
        Deprecated.
        Creates a LittleEndianDataOutputStream that wraps the given stream.
        Parameters:
        out - the stream to delegate to
    • Method Detail

      • write

        public void write​(byte[] b,
                          int off,
                          int len)
                   throws java.io.IOException
        Deprecated.
        Specified by:
        write in interface java.io.DataOutput
        Overrides:
        write in class java.io.FilterOutputStream
        Throws:
        java.io.IOException
      • writeBoolean

        public void writeBoolean​(boolean v)
                          throws java.io.IOException
        Deprecated.
        Specified by:
        writeBoolean in interface java.io.DataOutput
        Throws:
        java.io.IOException
      • writeByte

        public void writeByte​(int v)
                       throws java.io.IOException
        Deprecated.
        Specified by:
        writeByte in interface java.io.DataOutput
        Throws:
        java.io.IOException
      • writeBytes

        @Deprecated
        public void writeBytes​(java.lang.String s)
                        throws java.io.IOException
        Deprecated.
        The semantics of writeBytes(String s) are considered dangerous. Please use writeUTF(String s), writeChars(String s) or another write method instead.
        Specified by:
        writeBytes in interface java.io.DataOutput
        Throws:
        java.io.IOException
      • writeChar

        public void writeChar​(int v)
                       throws java.io.IOException
        Deprecated.
        Writes a char as specified by DataOutputStream.writeChar(int), except using little-endian byte order.
        Specified by:
        writeChar in interface java.io.DataOutput
        Throws:
        java.io.IOException - if an I/O error occurs
      • writeChars

        public void writeChars​(java.lang.String s)
                        throws java.io.IOException
        Deprecated.
        Writes a String as specified by DataOutputStream.writeChars(String), except each character is written using little-endian byte order.
        Specified by:
        writeChars in interface java.io.DataOutput
        Throws:
        java.io.IOException - if an I/O error occurs
      • writeDouble

        public void writeDouble​(double v)
                         throws java.io.IOException
        Deprecated.
        Writes a double as specified by DataOutputStream.writeDouble(double), except using little-endian byte order.
        Specified by:
        writeDouble in interface java.io.DataOutput
        Throws:
        java.io.IOException - if an I/O error occurs
      • writeFloat

        public void writeFloat​(float v)
                        throws java.io.IOException
        Deprecated.
        Writes a float as specified by DataOutputStream.writeFloat(float), except using little-endian byte order.
        Specified by:
        writeFloat in interface java.io.DataOutput
        Throws:
        java.io.IOException - if an I/O error occurs
      • writeInt

        public void writeInt​(int v)
                      throws java.io.IOException
        Deprecated.
        Writes an int as specified by DataOutputStream.writeInt(int), except using little-endian byte order.
        Specified by:
        writeInt in interface java.io.DataOutput
        Throws:
        java.io.IOException - if an I/O error occurs
      • writeLong

        public void writeLong​(long v)
                       throws java.io.IOException
        Deprecated.
        Writes a long as specified by DataOutputStream.writeLong(long), except using little-endian byte order.
        Specified by:
        writeLong in interface java.io.DataOutput
        Throws:
        java.io.IOException - if an I/O error occurs
      • writeShort

        public void writeShort​(int v)
                        throws java.io.IOException
        Deprecated.
        Writes a short as specified by DataOutputStream.writeShort(int), except using little-endian byte order.
        Specified by:
        writeShort in interface java.io.DataOutput
        Throws:
        java.io.IOException - if an I/O error occurs
      • writeUTF

        public void writeUTF​(java.lang.String str)
                      throws java.io.IOException
        Deprecated.
        Specified by:
        writeUTF in interface java.io.DataOutput
        Throws:
        java.io.IOException