public class BitInputStream extends FilterInputStream
in| コンストラクタと説明 |
|---|
BitInputStream(InputStream in) |
| 修飾子とタイプ | メソッドと説明 |
|---|---|
void |
find(byte[] pattern)
バイト単位でデータのある位置のうしろまでシーク
未完成
|
int |
read()
ビット処理をリセットしてしまいます
読み込んでいない8ビット未満のビットデータは破棄されます。
|
int |
read(byte[] data,
int off,
int length)
ビット処理を考慮せずデータを読み込みます。
|
int |
readBit(byte[] data) |
int |
readBit(byte[] dt,
int bitoffset,
int bitlen)
指定ビットを配列に格納する
offset,bitlen はビット単位
とりあえず 0で考える
dtの格納前のデータは破壊されるので要修正?
|
int |
readBit(int len)
ビット単位で読む
0~32ビットに対応
EOF 未対応
|
void |
resetBit()
8ビット単位まで捨てる.
|
available, close, mark, markSupported, read, reset, skippublic BitInputStream(InputStream in)
public void resetBit()
public int read()
throws IOException
read クラス内 FilterInputStreamIOExceptionpublic int read(byte[] data,
int off,
int length)
throws IOException
read クラス内 FilterInputStreamdata - データを受け取る配列off - オフセット(バイト単位)length - 受け取る長さ(バイト単位)IOExceptionpublic int readBit(int len)
throws IOException
len - IOExceptionpublic int readBit(byte[] dt,
int bitoffset,
int bitlen)
throws IOException
dt - bitoffset - bitlen - IOExceptionpublic int readBit(byte[] data)
throws IOException
IOExceptionpublic void find(byte[] pattern)
throws IOException
pattern - IOExceptionCopyright © 2024. All rights reserved.