Package org.docx4j.org.apache.poi.util
Class LittleEndianInputStream
java.lang.Object
java.io.InputStream
java.io.FilterInputStream
org.docx4j.org.apache.poi.util.LittleEndianInputStream
- All Implemented Interfaces:
java.io.Closeable,java.lang.AutoCloseable,LittleEndianInput
- Direct Known Subclasses:
ChunkedCipherInputStream
public class LittleEndianInputStream extends java.io.FilterInputStream implements LittleEndianInput
Wraps an
InputStream providing LittleEndianInput
This class does not buffer any input, so the stream read position maintained
by this class is consistent with that of the inner stream.- Author:
- Josh Micich
-
Field Summary
-
Constructor Summary
Constructors Constructor Description LittleEndianInputStream(java.io.InputStream is) -
Method Summary
Modifier and Type Method Description intavailable()bytereadByte()doublereadDouble()voidreadFully(byte[] buf)voidreadFully(byte[] buf, int off, int len)intreadInt()longreadLong()shortreadShort()intreadUByte()longreadUInt()get an unsigned int value from an InputStreamintreadUShort()Methods inherited from class java.io.FilterInputStream
close, mark, markSupported, read, read, read, reset, skip
-
Constructor Details
-
LittleEndianInputStream
public LittleEndianInputStream(java.io.InputStream is)
-
-
Method Details
-
available
public int available()- Specified by:
availablein interfaceLittleEndianInput- Overrides:
availablein classjava.io.FilterInputStream
-
readByte
public byte readByte()- Specified by:
readBytein interfaceLittleEndianInput
-
readUByte
public int readUByte()- Specified by:
readUBytein interfaceLittleEndianInput
-
readDouble
public double readDouble()- Specified by:
readDoublein interfaceLittleEndianInput
-
readInt
public int readInt()- Specified by:
readIntin interfaceLittleEndianInput
-
readUInt
public long readUInt()get an unsigned int value from an InputStream- Returns:
- the unsigned int (32-bit) value
- Throws:
java.io.IOException- will be propagated back to the callerLittleEndian.BufferUnderrunException- if the stream cannot provide enough bytes
-
readLong
public long readLong()- Specified by:
readLongin interfaceLittleEndianInput
-
readShort
public short readShort()- Specified by:
readShortin interfaceLittleEndianInput
-
readUShort
public int readUShort()- Specified by:
readUShortin interfaceLittleEndianInput
-
readFully
public void readFully(byte[] buf)- Specified by:
readFullyin interfaceLittleEndianInput
-
readFully
public void readFully(byte[] buf, int off, int len)- Specified by:
readFullyin interfaceLittleEndianInput
-