Class BitReader
java.lang.Object
org.codice.alliance.video.stream.mpegts.netty.BitReader
The BitReader wraps a ByteBuf and provides bit-level tools for reading bits, skipping bits, and
searching for MPEG-2 (h.262) start codes.
-
Constructor Details
-
BitReader
public BitReader(io.netty.buffer.ByteBuf byteBuf) - Parameters:
byteBuf- must be non-null
-
-
Method Details
-
testBit
Get the next bit's value, but do not actually consume the bit.- Returns:
- true if the next bit is 1, false if the next bit is 0
- Throws:
EOFException
-
readableBits
public long readableBits()Get the number of bits that can be read.- Returns:
- number of readable bits
-
skipBits
- Throws:
EOFException
-
readBit
- Throws:
EOFException
-
readBits
- Throws:
EOFException
-
isByteBoundary
public boolean isByteBoundary() -
findStart
-