Class LittleEndianDataInputStream

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

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

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

    Since:
    8.0
    • Constructor Summary

      Constructors 
      Constructor Description
      LittleEndianDataInputStream​(java.io.InputStream in)
      Deprecated.
      Creates a LittleEndianDataInputStream that wraps the given stream.
    • Method Summary

      All Methods Instance Methods Concrete Methods Deprecated Methods 
      Modifier and Type Method Description
      boolean readBoolean()
      Deprecated.
       
      byte readByte()
      Deprecated.
       
      char readChar()
      Deprecated.
      Reads a char as specified by DataInputStream.readChar(), except using little-endian byte order.
      double readDouble()
      Deprecated.
      Reads a double as specified by DataInputStream.readDouble(), except using little-endian byte order.
      float readFloat()
      Deprecated.
      Reads a float as specified by DataInputStream.readFloat(), except using little-endian byte order.
      void readFully​(byte[] b)
      Deprecated.
       
      void readFully​(byte[] b, int off, int len)
      Deprecated.
       
      int readInt()
      Deprecated.
      Reads an integer as specified by DataInputStream.readInt(), except using little-endian byte order.
      java.lang.String readLine()
      Deprecated.
      This method will throw an UnsupportedOperationException.
      long readLong()
      Deprecated.
      Reads a long as specified by DataInputStream.readLong(), except using little-endian byte order.
      short readShort()
      Deprecated.
      Reads a short as specified by DataInputStream.readShort(), except using little-endian byte order.
      int readUnsignedByte()
      Deprecated.
       
      int readUnsignedShort()
      Deprecated.
      Reads an unsigned short as specified by DataInputStream.readUnsignedShort(), except using little-endian byte order.
      java.lang.String readUTF()
      Deprecated.
       
      int skipBytes​(int n)
      Deprecated.
       
      • Methods inherited from class java.io.FilterInputStream

        available, close, mark, markSupported, read, read, read, reset, skip
      • Methods inherited from class java.io.InputStream

        nullInputStream, readAllBytes, readNBytes, readNBytes, transferTo
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • LittleEndianDataInputStream

        public LittleEndianDataInputStream​(java.io.InputStream in)
        Deprecated.
        Creates a LittleEndianDataInputStream that wraps the given stream.
        Parameters:
        in - the stream to delegate to
    • Method Detail

      • readLine

        public java.lang.String readLine()
        Deprecated.
        This method will throw an UnsupportedOperationException.
        Specified by:
        readLine in interface java.io.DataInput
      • readFully

        public void readFully​(byte[] b)
                       throws java.io.IOException
        Deprecated.
        Specified by:
        readFully in interface java.io.DataInput
        Throws:
        java.io.IOException
      • readFully

        public void readFully​(byte[] b,
                              int off,
                              int len)
                       throws java.io.IOException
        Deprecated.
        Specified by:
        readFully in interface java.io.DataInput
        Throws:
        java.io.IOException
      • skipBytes

        public int skipBytes​(int n)
                      throws java.io.IOException
        Deprecated.
        Specified by:
        skipBytes in interface java.io.DataInput
        Throws:
        java.io.IOException
      • readUnsignedByte

        public int readUnsignedByte()
                             throws java.io.IOException
        Deprecated.
        Specified by:
        readUnsignedByte in interface java.io.DataInput
        Throws:
        java.io.IOException
      • readUnsignedShort

        public int readUnsignedShort()
                              throws java.io.IOException
        Deprecated.
        Reads an unsigned short as specified by DataInputStream.readUnsignedShort(), except using little-endian byte order.
        Specified by:
        readUnsignedShort in interface java.io.DataInput
        Returns:
        the next two bytes of the input stream, interpreted as an unsigned 16-bit integer in little-endian byte order
        Throws:
        java.io.IOException - if an I/O error occurs
      • readInt

        public int readInt()
                    throws java.io.IOException
        Deprecated.
        Reads an integer as specified by DataInputStream.readInt(), except using little-endian byte order.
        Specified by:
        readInt in interface java.io.DataInput
        Returns:
        the next four bytes of the input stream, interpreted as an int in little-endian byte order
        Throws:
        java.io.IOException - if an I/O error occurs
      • readLong

        public long readLong()
                      throws java.io.IOException
        Deprecated.
        Reads a long as specified by DataInputStream.readLong(), except using little-endian byte order.
        Specified by:
        readLong in interface java.io.DataInput
        Returns:
        the next eight bytes of the input stream, interpreted as a long in little-endian byte order
        Throws:
        java.io.IOException - if an I/O error occurs
      • readFloat

        public float readFloat()
                        throws java.io.IOException
        Deprecated.
        Reads a float as specified by DataInputStream.readFloat(), except using little-endian byte order.
        Specified by:
        readFloat in interface java.io.DataInput
        Returns:
        the next four bytes of the input stream, interpreted as a float in little-endian byte order
        Throws:
        java.io.IOException - if an I/O error occurs
      • readDouble

        public double readDouble()
                          throws java.io.IOException
        Deprecated.
        Reads a double as specified by DataInputStream.readDouble(), except using little-endian byte order.
        Specified by:
        readDouble in interface java.io.DataInput
        Returns:
        the next eight bytes of the input stream, interpreted as a double in little-endian byte order
        Throws:
        java.io.IOException - if an I/O error occurs
      • readUTF

        public java.lang.String readUTF()
                                 throws java.io.IOException
        Deprecated.
        Specified by:
        readUTF in interface java.io.DataInput
        Throws:
        java.io.IOException
      • readShort

        public short readShort()
                        throws java.io.IOException
        Deprecated.
        Reads a short as specified by DataInputStream.readShort(), except using little-endian byte order.
        Specified by:
        readShort in interface java.io.DataInput
        Returns:
        the next two bytes of the input stream, interpreted as a short in little-endian byte order.
        Throws:
        java.io.IOException - if an I/O error occurs.
      • readChar

        public char readChar()
                      throws java.io.IOException
        Deprecated.
        Reads a char as specified by DataInputStream.readChar(), except using little-endian byte order.
        Specified by:
        readChar in interface java.io.DataInput
        Returns:
        the next two bytes of the input stream, interpreted as a char in little-endian byte order
        Throws:
        java.io.IOException - if an I/O error occurs
      • readByte

        public byte readByte()
                      throws java.io.IOException
        Deprecated.
        Specified by:
        readByte in interface java.io.DataInput
        Throws:
        java.io.IOException
      • readBoolean

        public boolean readBoolean()
                            throws java.io.IOException
        Deprecated.
        Specified by:
        readBoolean in interface java.io.DataInput
        Throws:
        java.io.IOException