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
Fields -
Constructor Summary
ConstructorsConstructorDescriptionCreates a new LittleEndien reader from the given input stream. -
Method Summary
Modifier and TypeMethodDescriptionintvoidclose()intread()intread(byte[] buf) intread(byte[] buf, int off, int len) booleanbytereadByte()charreadChar()doublefloatvoidreadFully(byte[] b) voidreadFully(byte[] b, int off, int len) intreadInt()readLine()longreadLong()shortlongreadUInt()read an unsigned int as a longintintreadUTF()intskipBytes(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:
readin classInputStream- Throws:
IOException
-
read
- Overrides:
readin classInputStream- Throws:
IOException
-
read
- Overrides:
readin classInputStream- Throws:
IOException
-
readUnsignedShort
- Specified by:
readUnsignedShortin 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:
readBooleanin interfaceDataInput- Throws:
IOException
-
readByte
- Specified by:
readBytein interfaceDataInput- Throws:
IOException
-
readUnsignedByte
- Specified by:
readUnsignedBytein interfaceDataInput- Throws:
IOException
-
readShort
- Specified by:
readShortin interfaceDataInput- Throws:
IOException
-
readChar
- Specified by:
readCharin interfaceDataInput- Throws:
IOException
-
readInt
- Specified by:
readIntin interfaceDataInput- Throws:
IOException
-
readLong
- Specified by:
readLongin interfaceDataInput- Throws:
IOException
-
readFloat
- Specified by:
readFloatin interfaceDataInput- Throws:
IOException
-
readDouble
- Specified by:
readDoublein interfaceDataInput- Throws:
IOException
-
readFully
- Specified by:
readFullyin interfaceDataInput- Throws:
IOException
-
readFully
- Specified by:
readFullyin interfaceDataInput- Throws:
IOException
-
skipBytes
- Specified by:
skipBytesin interfaceDataInput- Throws:
IOException
-
readLine
- Specified by:
readLinein interfaceDataInput- Throws:
IOException
-
readUTF
- Specified by:
readUTFin interfaceDataInput- Throws:
IOException
-
close
- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Overrides:
closein classInputStream- Throws:
IOException
-
available
- Overrides:
availablein classInputStream- Throws:
IOException
-