Package com.google.common.io
Class LittleEndianDataInputStream
- java.lang.Object
-
- java.io.InputStream
-
- java.io.FilterInputStream
-
- com.google.common.io.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 2023An implementation ofDataInputthat uses little-endian byte ordering for readingshort,int,float,double, andlongvalues.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 aLittleEndianDataInputStreamthat wraps the given stream.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description booleanreadBoolean()Deprecated.bytereadByte()Deprecated.charreadChar()Deprecated.Reads a char as specified byDataInputStream.readChar(), except using little-endian byte order.doublereadDouble()Deprecated.Reads adoubleas specified byDataInputStream.readDouble(), except using little-endian byte order.floatreadFloat()Deprecated.Reads afloatas specified byDataInputStream.readFloat(), except using little-endian byte order.voidreadFully(byte[] b)Deprecated.voidreadFully(byte[] b, int off, int len)Deprecated.intreadInt()Deprecated.Reads an integer as specified byDataInputStream.readInt(), except using little-endian byte order.java.lang.StringreadLine()Deprecated.This method will throw anUnsupportedOperationException.longreadLong()Deprecated.Reads alongas specified byDataInputStream.readLong(), except using little-endian byte order.shortreadShort()Deprecated.Reads ashortas specified byDataInputStream.readShort(), except using little-endian byte order.intreadUnsignedByte()Deprecated.intreadUnsignedShort()Deprecated.Reads an unsignedshortas specified byDataInputStream.readUnsignedShort(), except using little-endian byte order.java.lang.StringreadUTF()Deprecated.intskipBytes(int n)Deprecated.-
Methods inherited from class java.io.FilterInputStream
available, close, mark, markSupported, read, read, read, reset, skip
-
-
-
-
Method Detail
-
readLine
public java.lang.String readLine()
Deprecated.This method will throw anUnsupportedOperationException.- Specified by:
readLinein interfacejava.io.DataInput
-
readFully
public void readFully(byte[] b) throws java.io.IOExceptionDeprecated.- Specified by:
readFullyin interfacejava.io.DataInput- Throws:
java.io.IOException
-
readFully
public void readFully(byte[] b, int off, int len) throws java.io.IOExceptionDeprecated.- Specified by:
readFullyin interfacejava.io.DataInput- Throws:
java.io.IOException
-
skipBytes
public int skipBytes(int n) throws java.io.IOExceptionDeprecated.- Specified by:
skipBytesin interfacejava.io.DataInput- Throws:
java.io.IOException
-
readUnsignedByte
public int readUnsignedByte() throws java.io.IOExceptionDeprecated.- Specified by:
readUnsignedBytein interfacejava.io.DataInput- Throws:
java.io.IOException
-
readUnsignedShort
public int readUnsignedShort() throws java.io.IOExceptionDeprecated.Reads an unsignedshortas specified byDataInputStream.readUnsignedShort(), except using little-endian byte order.- Specified by:
readUnsignedShortin interfacejava.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.IOExceptionDeprecated.Reads an integer as specified byDataInputStream.readInt(), except using little-endian byte order.- Specified by:
readIntin interfacejava.io.DataInput- Returns:
- the next four bytes of the input stream, interpreted as an
intin little-endian byte order - Throws:
java.io.IOException- if an I/O error occurs
-
readLong
public long readLong() throws java.io.IOExceptionDeprecated.Reads alongas specified byDataInputStream.readLong(), except using little-endian byte order.- Specified by:
readLongin interfacejava.io.DataInput- Returns:
- the next eight bytes of the input stream, interpreted as a
longin little-endian byte order - Throws:
java.io.IOException- if an I/O error occurs
-
readFloat
public float readFloat() throws java.io.IOExceptionDeprecated.Reads afloatas specified byDataInputStream.readFloat(), except using little-endian byte order.- Specified by:
readFloatin interfacejava.io.DataInput- Returns:
- the next four bytes of the input stream, interpreted as a
floatin little-endian byte order - Throws:
java.io.IOException- if an I/O error occurs
-
readDouble
public double readDouble() throws java.io.IOExceptionDeprecated.Reads adoubleas specified byDataInputStream.readDouble(), except using little-endian byte order.- Specified by:
readDoublein interfacejava.io.DataInput- Returns:
- the next eight bytes of the input stream, interpreted as a
doublein little-endian byte order - Throws:
java.io.IOException- if an I/O error occurs
-
readUTF
public java.lang.String readUTF() throws java.io.IOExceptionDeprecated.- Specified by:
readUTFin interfacejava.io.DataInput- Throws:
java.io.IOException
-
readShort
public short readShort() throws java.io.IOExceptionDeprecated.Reads ashortas specified byDataInputStream.readShort(), except using little-endian byte order.- Specified by:
readShortin interfacejava.io.DataInput- Returns:
- the next two bytes of the input stream, interpreted as a
shortin little-endian byte order. - Throws:
java.io.IOException- if an I/O error occurs.
-
readChar
public char readChar() throws java.io.IOExceptionDeprecated.Reads a char as specified byDataInputStream.readChar(), except using little-endian byte order.- Specified by:
readCharin interfacejava.io.DataInput- Returns:
- the next two bytes of the input stream, interpreted as a
charin little-endian byte order - Throws:
java.io.IOException- if an I/O error occurs
-
readByte
public byte readByte() throws java.io.IOExceptionDeprecated.- Specified by:
readBytein interfacejava.io.DataInput- Throws:
java.io.IOException
-
readBoolean
public boolean readBoolean() throws java.io.IOExceptionDeprecated.- Specified by:
readBooleanin interfacejava.io.DataInput- Throws:
java.io.IOException
-
-