Package com.jme3.util
Class LittleEndien
java.lang.Object
java.io.InputStream
com.jme3.util.LittleEndien
- All Implemented Interfaces:
Closeable
,DataInput
,AutoCloseable
LittleEndien
is a class to read little-endian stored data
via an InputStream. All functions work as defined in DataInput, but
assume they come from a LittleEndien input stream. Currently used to read .ms3d and .3ds files.-
Field Summary
-
Constructor Summary
ConstructorDescriptionCreates a new LittleEndien reader from the given input stream. -
Method Summary
Modifier and TypeMethodDescriptionint
void
close()
int
read()
int
read
(byte[] buf) int
read
(byte[] buf, int off, int len) boolean
byte
readByte()
char
readChar()
double
float
void
readFully
(byte[] b) void
readFully
(byte[] b, int off, int len) int
readInt()
readLine()
long
readLong()
short
long
readUInt()
read an unsigned int as a longint
int
readUTF()
int
skipBytes
(int n) Methods inherited from class java.io.InputStream
mark, markSupported, nullInputStream, readAllBytes, readNBytes, readNBytes, reset, skip, skipNBytes, transferTo
-
Field Details
-
in
-
-
Constructor Details
-
LittleEndien
Creates a new LittleEndien reader from the given input stream. The stream is wrapped in a BufferedReader automatically.- Parameters:
in
- The input stream to read from.
-
-
Method Details
-
read
- Specified by:
read
in classInputStream
- Throws:
IOException
-
read
- Overrides:
read
in classInputStream
- Throws:
IOException
-
read
- Overrides:
read
in classInputStream
- Throws:
IOException
-
readUnsignedShort
- Specified by:
readUnsignedShort
in interfaceDataInput
- Throws:
IOException
-
readUInt
read an unsigned int as a long- Returns:
- the value that was read
- Throws:
IOException
- if an I/O error occurs while reading
-
readBoolean
- Specified by:
readBoolean
in interfaceDataInput
- Throws:
IOException
-
readByte
- Specified by:
readByte
in interfaceDataInput
- Throws:
IOException
-
readUnsignedByte
- Specified by:
readUnsignedByte
in interfaceDataInput
- Throws:
IOException
-
readShort
- Specified by:
readShort
in interfaceDataInput
- Throws:
IOException
-
readChar
- Specified by:
readChar
in interfaceDataInput
- Throws:
IOException
-
readInt
- Specified by:
readInt
in interfaceDataInput
- Throws:
IOException
-
readLong
- Specified by:
readLong
in interfaceDataInput
- Throws:
IOException
-
readFloat
- Specified by:
readFloat
in interfaceDataInput
- Throws:
IOException
-
readDouble
- Specified by:
readDouble
in interfaceDataInput
- Throws:
IOException
-
readFully
- Specified by:
readFully
in interfaceDataInput
- Throws:
IOException
-
readFully
- Specified by:
readFully
in interfaceDataInput
- Throws:
IOException
-
skipBytes
- Specified by:
skipBytes
in interfaceDataInput
- Throws:
IOException
-
readLine
- Specified by:
readLine
in interfaceDataInput
- Throws:
IOException
-
readUTF
- Specified by:
readUTF
in interfaceDataInput
- Throws:
IOException
-
close
- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
- Overrides:
close
in classInputStream
- Throws:
IOException
-
available
- Overrides:
available
in classInputStream
- Throws:
IOException
-