- java.lang.Object
-
- java.io.InputStream
-
- net.morimekta.io.BinaryInputStream
-
- net.morimekta.io.BigEndianBinaryInputStream
-
- All Implemented Interfaces:
Closeable
,AutoCloseable
public class BigEndianBinaryInputStream extends BinaryInputStream
IO-Optimized binary reader using big-endian integer encoding. SeeBinaryInputStream
for details.
-
-
Constructor Summary
Constructors Constructor Description BigEndianBinaryInputStream(InputStream in)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected int
internalReadIntBase128(int i)
protected long
internalReadLongBase128(int i)
protected int
unshift2bytes(int b1, int b2)
protected int
unshift3bytes(int b1, int b2, int b3)
protected int
unshift4bytes(int b1, int b2, int b3, int b4)
protected long
unshift8bytes(long b1, long b2, long b3, long b4, long b5, long b6, long b7, long b8)
protected long
unshiftNBytes(byte[] bytes)
-
Methods inherited from class net.morimekta.io.BinaryInputStream
available, close, expect, expectByte, expectBytes, expectDouble, expectFloat, expectInt, expectIntBase128, expectIntZigzag, expectLong, expectLongBase128, expectLongZigzag, expectShort, expectSigned, expectUInt16, expectUInt24, expectUInt32, expectUInt8, expectULong40, expectULong48, expectULong56, expectULong64, expectUnsigned, expectUnsignedLong, mark, markSupported, read, read, read, readIntBase128, readIntVarint, readIntZigzag, readLongBase128, readLongVarint, readLongZigzag, readUInt16, reset
-
Methods inherited from class java.io.InputStream
nullInputStream, readAllBytes, readNBytes, readNBytes, skip, transferTo
-
-
-
-
Constructor Detail
-
BigEndianBinaryInputStream
public BigEndianBinaryInputStream(InputStream in)
-
-
Method Detail
-
unshift2bytes
protected int unshift2bytes(int b1, int b2)
- Specified by:
unshift2bytes
in classBinaryInputStream
-
unshift3bytes
protected int unshift3bytes(int b1, int b2, int b3)
- Specified by:
unshift3bytes
in classBinaryInputStream
-
unshift4bytes
protected int unshift4bytes(int b1, int b2, int b3, int b4)
- Specified by:
unshift4bytes
in classBinaryInputStream
-
unshift8bytes
protected long unshift8bytes(long b1, long b2, long b3, long b4, long b5, long b6, long b7, long b8)
- Specified by:
unshift8bytes
in classBinaryInputStream
-
unshiftNBytes
protected long unshiftNBytes(byte[] bytes)
- Specified by:
unshiftNBytes
in classBinaryInputStream
-
internalReadIntBase128
protected int internalReadIntBase128(int i) throws IOException
- Specified by:
internalReadIntBase128
in classBinaryInputStream
- Throws:
IOException
-
internalReadLongBase128
protected long internalReadLongBase128(int i) throws IOException
- Specified by:
internalReadLongBase128
in classBinaryInputStream
- Throws:
IOException
-
-