Package com.google.common.io
Class LittleEndianDataInputStream
java.lang.Object
java.io.InputStream
java.io.FilterInputStream
com.google.common.io.LittleEndianDataInputStream
- All Implemented Interfaces:
Closeable
,DataInput
,AutoCloseable
@Beta
@Deprecated(since="2022-12-01")
public final class LittleEndianDataInputStream
extends FilterInputStream
implements 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
ConstructorsConstructorDescriptionDeprecated.Creates aLittleEndianDataInputStream
that wraps the given stream. -
Method Summary
Modifier and TypeMethodDescriptionboolean
Deprecated.byte
readByte()
Deprecated.char
readChar()
Deprecated.Reads a char as specified byDataInputStream.readChar()
, except using little-endian byte order.double
Deprecated.Reads adouble
as specified byDataInputStream.readDouble()
, except using little-endian byte order.float
Deprecated.Reads afloat
as specified byDataInputStream.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 byDataInputStream.readInt()
, except using little-endian byte order.readLine()
Deprecated.This method will throw anUnsupportedOperationException
.long
readLong()
Deprecated.Reads along
as specified byDataInputStream.readLong()
, except using little-endian byte order.short
Deprecated.Reads ashort
as specified byDataInputStream.readShort()
, except using little-endian byte order.int
Deprecated.int
Deprecated.Reads an unsignedshort
as specified byDataInputStream.readUnsignedShort()
, except using little-endian byte order.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, skipNBytes, transferTo
-
Constructor Details
-
LittleEndianDataInputStream
Deprecated.Creates aLittleEndianDataInputStream
that wraps the given stream.- Parameters:
in
- the stream to delegate to
-
-
Method Details
-
readLine
Deprecated.This method will throw anUnsupportedOperationException
. -
readFully
Deprecated.- Specified by:
readFully
in interfaceDataInput
- Throws:
IOException
-
readFully
Deprecated.- Specified by:
readFully
in interfaceDataInput
- Throws:
IOException
-
skipBytes
Deprecated.- Specified by:
skipBytes
in interfaceDataInput
- Throws:
IOException
-
readUnsignedByte
Deprecated.- Specified by:
readUnsignedByte
in interfaceDataInput
- Throws:
IOException
-
readUnsignedShort
Deprecated.Reads an unsignedshort
as specified byDataInputStream.readUnsignedShort()
, except using little-endian byte order.- Specified by:
readUnsignedShort
in interfaceDataInput
- Returns:
- the next two bytes of the input stream, interpreted as an unsigned 16-bit integer in little-endian byte order
- Throws:
IOException
- if an I/O error occurs
-
readInt
Deprecated.Reads an integer as specified byDataInputStream.readInt()
, except using little-endian byte order.- Specified by:
readInt
in interfaceDataInput
- Returns:
- the next four bytes of the input stream, interpreted as an
int
in little-endian byte order - Throws:
IOException
- if an I/O error occurs
-
readLong
Deprecated.Reads along
as specified byDataInputStream.readLong()
, except using little-endian byte order.- Specified by:
readLong
in interfaceDataInput
- Returns:
- the next eight bytes of the input stream, interpreted as a
long
in little-endian byte order - Throws:
IOException
- if an I/O error occurs
-
readFloat
Deprecated.Reads afloat
as specified byDataInputStream.readFloat()
, except using little-endian byte order.- Specified by:
readFloat
in interfaceDataInput
- Returns:
- the next four bytes of the input stream, interpreted as a
float
in little-endian byte order - Throws:
IOException
- if an I/O error occurs
-
readDouble
Deprecated.Reads adouble
as specified byDataInputStream.readDouble()
, except using little-endian byte order.- Specified by:
readDouble
in interfaceDataInput
- Returns:
- the next eight bytes of the input stream, interpreted as a
double
in little-endian byte order - Throws:
IOException
- if an I/O error occurs
-
readUTF
Deprecated.- Specified by:
readUTF
in interfaceDataInput
- Throws:
IOException
-
readShort
Deprecated.Reads ashort
as specified byDataInputStream.readShort()
, except using little-endian byte order.- Specified by:
readShort
in interfaceDataInput
- Returns:
- the next two bytes of the input stream, interpreted as a
short
in little-endian byte order. - Throws:
IOException
- if an I/O error occurs.
-
readChar
Deprecated.Reads a char as specified byDataInputStream.readChar()
, except using little-endian byte order.- Specified by:
readChar
in interfaceDataInput
- Returns:
- the next two bytes of the input stream, interpreted as a
char
in little-endian byte order - Throws:
IOException
- if an I/O error occurs
-
readByte
Deprecated.- Specified by:
readByte
in interfaceDataInput
- Throws:
IOException
-
readBoolean
Deprecated.- Specified by:
readBoolean
in interfaceDataInput
- Throws:
IOException
-