public final class DataInputStream extends Object
修飾子とタイプ | クラスと説明 |
---|---|
static class |
DataInputStream.SeekType
シークの種類を定義する。
|
コンストラクタと説明 |
---|
DataInputStream(InputStream is,
boolean streamClsoe)
ストリームを生成する
|
修飾子とタイプ | メソッドと説明 |
---|---|
void |
dispose()
資源の解放を行う。
|
boolean |
readBoolean()
真偽の値を取得する。
|
void |
readBuffer(byte[] buf,
int length)
バッファから必要な長さを読み取る。
|
int |
readBuffer(byte[] buf,
int index,
int length)
必要な容量を読み取る
|
byte[] |
readBuffer(int length)
バッファを直接読み取る。
|
double |
readDouble()
IEEE754形式のビット列をdoubleに変換し、取得する。
|
byte[] |
readFile()
ファイルを作成する。
|
float |
readFloat()
IEEE754形式のビット列をfloatに変換し、取得する。
|
double |
readGLFixedDouble()
固定小数をdouble変換して取得する。
|
float |
readGLFixedFloat()
固定小数をfloat変換して取得する。
|
short |
readS16()
バッファから2バイト読み取る。
|
int |
readS24()
バッファから3バイト読み取る。
|
int |
readS32()
バッファから4バイト読み取る。
|
long |
readS64()
バッファから8バイト整数を読み取る。
|
long[] |
readS64Array()
write64Arrayした配列を取り出す。
|
byte |
readS8()
バッファから1バイト読み取る。
|
String |
readString()
文字列を読み取る。
|
int |
readU16()
2バイト整数を取得し、読み込み位置を2バイト進める。
|
int |
readU8()
1バイト整数を取得し、読み込み位置を1バイト進める。
|
void |
seek(DataInputStream.SeekType type,
int pos)
読み取り位置を指定する。
|
void |
setDataWaitTimeMs(long dataWaitTimeMs)
データの到達待ちのタイムアウトを指定する
|
public DataInputStream(InputStream is, boolean streamClsoe)
is
- データソースstreamClsoe
- dispose()
でStreamを閉じる場合はtruepublic void setDataWaitTimeMs(long dataWaitTimeMs)
public byte readS8() throws IOException
IOException
public short readS16() throws IOException
IOException
public int readS24() throws IOException
IOException
public int readU8() throws IOException
IOException
public int readU16() throws IOException
IOException
public int readS32() throws IOException
IOException
public long readS64() throws IOException
IOException
public long[] readS64Array() throws IOException
IOException
public float readGLFixedFloat() throws IOException
IOException
public double readGLFixedDouble() throws IOException
IOException
public float readFloat() throws IOException
IOException
public double readDouble() throws IOException
IOException
public boolean readBoolean() throws IOException
IOException
public String readString() throws IOException
IOException
public byte[] readBuffer(int length) throws IOException
length
- 読み取るバイト数IOException
public byte[] readFile() throws IOException
IOException
public void readBuffer(byte[] buf, int length) throws IOException
buf
- 書き込み対象のバッファlength
- バッファの長さIOException
public int readBuffer(byte[] buf, int index, int length) throws IOException
buf
- 書き込み対象のバッファindex
- 書き込み対象インデックスlength
- 書き込み対象の長さIOException
public void dispose()
reader
のdispose()を行う。public void seek(DataInputStream.SeekType type, int pos) throws IOException
type
- シークの種類pos
- シークの位置(byte)IOException