|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectdeadbeef.Tools.BitStream
public class BitStream
Simple helper class to read bitwise from a buffer.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Constructor Summary | |
---|---|
BitStream(byte[] buffer)
Constructor |
Method Summary | |
---|---|
int |
bitsLeft()
Get number of bits left in buffer |
int |
readBits(int n)
Read n bits from buffer (n <= 32) |
void |
syncToByte()
Synchronize to next byte in data buffer (skip remaining 0-7 bits) |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public BitStream(byte[] buffer)
buffer
- Byte array to create bitstream forMethod Detail |
---|
public int bitsLeft()
public int readBits(int n)
n
- Number of bits to read from buffer (n<=32)
public void syncToByte()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |