public final class DataOutputStream extends Object
DataInputStream
で開くことが可能。コンストラクタと説明 |
---|
DataOutputStream(OutputStream os,
boolean withClose) |
修飾子とタイプ | メソッドと説明 |
---|---|
void |
dispose()
リソースの開放を行う。
|
static int |
getWriteSize(String str)
書き込みを行った場合の保存バイト数を計算する。
|
void |
writeBoolean(boolean b)
boolとして書き込む
|
void |
writeBuffer(byte[] buf,
int position,
int length)
実際のバッファへ書き込みを行う。
|
void |
writeFile(byte[] buffer)
配列の大きさと本体を保存する。
|
void |
writeFloat(float f)
浮動小数値を書き込む。
|
void |
writeFloatArray(float[] buffer)
浮動小数点配列を保存する。
|
void |
writeGLFloat(float f)
浮動小数値をGL形式の固定小数として保存する。
|
void |
writeS16(short n)
2バイト整数を保存する。
|
void |
writeS32(int n)
4バイト整数を保存する。
|
void |
writeS32Array(int[] buffer)
4バイト整数の配列を保存する。
|
void |
writeS32ArrayWithLength(int[] buffer)
4バイト整数の配列を保存する。
|
void |
writeS64(long n)
8バイト整数を保存する。
|
void |
writeS64Array(long[] buffer)
8バイト整数の配列を保存する。
|
void |
writeS64ArrayWithLength(long[] buffer)
8バイト整数の配列を保存する。
|
void |
writeS8(byte n)
1バイト整数を保存する。
|
void |
writeString(String str)
文字列を書き込む。
|
public DataOutputStream(OutputStream os, boolean withClose)
os
- 書き込み対象withClose
- dispose()
でosをcloseする場合はtruepublic void dispose()
public void writeBuffer(byte[] buf, int position, int length) throws IOException
buf
- 書き込み対象のバッファposition
- buf[position]length
- 書き込みbyte数IOException
public void writeS8(byte n) throws IOException
IOException
public void writeBoolean(boolean b) throws IOException
IOException
public void writeS16(short n) throws IOException
IOException
public void writeS32(int n) throws IOException
IOException
public void writeS64(long n) throws IOException
IOException
public final void writeS32Array(int[] buffer) throws IOException
IOException
public final void writeS32ArrayWithLength(int[] buffer) throws IOException
IOException
public final void writeS64Array(long[] buffer) throws IOException
IOException
public final void writeS64ArrayWithLength(long[] buffer) throws IOException
IOException
public void writeFloatArray(float[] buffer) throws IOException
IOException
public void writeGLFloat(float f) throws IOException
IOException
public void writeFloat(float f) throws IOException
IOException
public void writeString(String str) throws IOException
str
- IOException
public static int getWriteSize(String str)
public void writeFile(byte[] buffer) throws IOException
buffer
- 書き込むファイルIOException