Class DataOutputStream
package java.io
java.lang.Object | +--java.io.OutputStream | +--java.io.DataOutputStreamAll Implemented Interfaces:
DataOutput
implements DataOutput:
자바에서 지원하는 타입 객체를 바이트 스트림으로 변환해 출력할 수 있도록 만든 출력 스트림 클래스.
필드 요약
섹션 제목: “필드 요약”protected OutputStream out— 실제 출력할 출력스트림.protected int written— out로 출력한 바이트 갯수.
생성자 요약
섹션 제목: “생성자 요약”- DataOutputStream ( OutputStream out) 새로운 객체를 만든다.
메서드 요약
섹션 제목: “메서드 요약”void close ()— 출력 스트림을 닫는다.void flush ()— 중간 버퍼에 남아있는 정보들을 실제 출력하도록 한다.void write (byte[] buf, int offset, int len)— 바이트 배열의 일부분을 출력한다.void write (int b)— 매개변수로 받은 변수 값 중 상위 24비트는 버리고 나머지 8비트만 출력한다.void writeBoolean (boolean b)— 매개변수 값이 true이면 1 false이면 0을 출력한다.void writeByte (int b)— 매개변수로 받은 변수 값 중 상위 24비트는 버리고 나머지 8비트만 출력한다.void writeChar (int c)— 매개변수로 받은 변수 값 중 상위 16비트는 버리고 8~15비트까지 출력하고 이어 하위 8비트를 출력한다.void writeChars ( String s)— 문자열을 구성하는 문자들을 인덱스 0 부터 차례대로 출력한다.void writeDouble (double v)void writeFloat (float v)void writeInt (int i)— 매개변수로 받은 변수 값 중 상위 8비트부터 차례대로 8비트 단위로 출력한다.void writeLong (long l)— 매개변수로 받은 변수 값 중 상위 8비트부터 차례대로 8비트 단위로 출력한다.void writeShort (int s)— 매개변수로 받은 변수 값 중 상위 16비트는 버리고 8~15비트까지 출력하고 이어 하위 8비트를 출력한다.void writeUTF ( String s)— 문자열을 UTF형식으로 바꿔 출력한다.
필드 상세
섹션 제목: “필드 상세”written
섹션 제목: “written”protected int written- out로 출력한 바이트 갯수.
out
섹션 제목: “out”protected OutputStream out- 실제 출력할 출력스트림.
DataOutputStream
섹션 제목: “DataOutputStream”public DataOutputStream(OutputStream out)Parameters:
out- 실제 바이트 정보가 출력될 출력 스트림.
write
섹션 제목: “write”public void write(int b) throws IOExceptionSpecified by:
writein interfaceDataOutput
Overrides:
writein classOutputStream
Parameters:
b- 출력할 정보.
Throws:
IOException-
write
섹션 제목: “write”public void write(byte[] buf, int offset, int len) throws IOExceptionSpecified by:
writein interfaceDataOutput
Overrides:
writein classOutputStream
Parameters:
len- 출력할 갯수.
Throws:
IOException-
flush
섹션 제목: “flush”public void flush() throws IOExceptionOverrides:
flushin classOutputStream- Following copied from class:
java.io.OutputStream
Throws:
IOException-
close
섹션 제목: “close”public void close() throws IOExceptionOverrides:
closein classOutputStream
Throws:
IOException-
writeBoolean
섹션 제목: “writeBoolean”public final void writeBoolean(boolean b) throws IOExceptionSpecified by:
writeBooleanin interfaceDataOutput
Parameters:
b- 출력할 boolean변수.
Throws:
IOException-
writeByte
섹션 제목: “writeByte”public final void writeByte(int b) throws IOExceptionSpecified by:
writeBytein interfaceDataOutput
Parameters:
b- 출력할 정보.
Throws:
IOException-
writeShort
섹션 제목: “writeShort”public final void writeShort(int s) throws IOExceptionSpecified by:
writeShortin interfaceDataOutput
Parameters:
s- 출력할 정보.
Throws:
IOException-
writeChar
섹션 제목: “writeChar”public final void writeChar(int c) throws IOExceptionSpecified by:
writeCharin interfaceDataOutput
Parameters:
c- 출력할 정보.
Throws:
IOException-
writeInt
섹션 제목: “writeInt”public final void writeInt(int i) throws IOExceptionSpecified by:
writeIntin interfaceDataOutput
Parameters:
i- 출력할 정보.
Throws:
IOException-
writeLong
섹션 제목: “writeLong”public final void writeLong(long l) throws IOExceptionSpecified by:
writeLongin interfaceDataOutput
Parameters:
l- 출력할 정보.
Throws:
IOException-
writeFloat
섹션 제목: “writeFloat”public final void writeFloat(float v) throws IOExceptionSpecified by:
writeFloatin interfaceDataOutput
writeDouble
섹션 제목: “writeDouble”public final void writeDouble(double v) throws IOExceptionSpecified by:
writeDoublein interfaceDataOutput
writeChars
섹션 제목: “writeChars”public final void writeChars(String s) throws IOExceptionSpecified by:
writeCharsin interfaceDataOutput
Parameters:
s- 출력할 문자열.
Throws:
IOException-
writeUTF
섹션 제목: “writeUTF”public final void writeUTF(String s) throws IOExceptionSpecified by:
writeUTFin interfaceDataOutput
Parameters:
str- 출력할 문자열.
Throws:
IOException-## 생성자 상세
DataOutputStream
섹션 제목: “DataOutputStream”public DataOutputStream(OutputStream out)Parameters:
out- 실제 바이트 정보가 출력될 출력 스트림.
write
섹션 제목: “write”public void write(int b) throws IOExceptionSpecified by:
writein interfaceDataOutput
Overrides:
writein classOutputStream
Parameters:
b- 출력할 정보.
Throws:
IOException-
write
섹션 제목: “write”public void write(byte[] buf, int offset, int len) throws IOExceptionSpecified by:
writein interfaceDataOutput
Overrides:
writein classOutputStream
Parameters:
len- 출력할 갯수.
Throws:
IOException-
flush
섹션 제목: “flush”public void flush() throws IOExceptionOverrides:
flushin classOutputStream- Following copied from class:
java.io.OutputStream
Throws:
IOException-
close
섹션 제목: “close”public void close() throws IOExceptionOverrides:
closein classOutputStream
Throws:
IOException-
writeBoolean
섹션 제목: “writeBoolean”public final void writeBoolean(boolean b) throws IOExceptionSpecified by:
writeBooleanin interfaceDataOutput
Parameters:
b- 출력할 boolean변수.
Throws:
IOException-
writeByte
섹션 제목: “writeByte”public final void writeByte(int b) throws IOExceptionSpecified by:
writeBytein interfaceDataOutput
Parameters:
b- 출력할 정보.
Throws:
IOException-
writeShort
섹션 제목: “writeShort”public final void writeShort(int s) throws IOExceptionSpecified by:
writeShortin interfaceDataOutput
Parameters:
s- 출력할 정보.
Throws:
IOException-
writeChar
섹션 제목: “writeChar”public final void writeChar(int c) throws IOExceptionSpecified by:
writeCharin interfaceDataOutput
Parameters:
c- 출력할 정보.
Throws:
IOException-
writeInt
섹션 제목: “writeInt”public final void writeInt(int i) throws IOExceptionSpecified by:
writeIntin interfaceDataOutput
Parameters:
i- 출력할 정보.
Throws:
IOException-
writeLong
섹션 제목: “writeLong”public final void writeLong(long l) throws IOExceptionSpecified by:
writeLongin interfaceDataOutput
Parameters:
l- 출력할 정보.
Throws:
IOException-
writeFloat
섹션 제목: “writeFloat”public final void writeFloat(float v) throws IOExceptionSpecified by:
writeFloatin interfaceDataOutput
writeDouble
섹션 제목: “writeDouble”public final void writeDouble(double v) throws IOExceptionSpecified by:
writeDoublein interfaceDataOutput
writeChars
섹션 제목: “writeChars”public final void writeChars(String s) throws IOExceptionSpecified by:
writeCharsin interfaceDataOutput
Parameters:
s- 출력할 문자열.
Throws:
IOException-
writeUTF
섹션 제목: “writeUTF”public final void writeUTF(String s) throws IOExceptionSpecified by:
writeUTFin interfaceDataOutput
Parameters:
str- 출력할 문자열.
Throws:
IOException-## 메서드 상세
write
섹션 제목: “write”public void write(int b) throws IOExceptionSpecified by:
writein interfaceDataOutput
Overrides:
writein classOutputStream
Parameters:
b- 출력할 정보.
Throws:
IOException-
write
섹션 제목: “write”public void write(byte[] buf, int offset, int len) throws IOExceptionSpecified by:
writein interfaceDataOutput
Overrides:
writein classOutputStream
Parameters:
len- 출력할 갯수.
Throws:
IOException-
flush
섹션 제목: “flush”public void flush() throws IOExceptionOverrides:
flushin classOutputStream- Following copied from class:
java.io.OutputStream
Throws:
IOException-
close
섹션 제목: “close”public void close() throws IOExceptionOverrides:
closein classOutputStream
Throws:
IOException-
writeBoolean
섹션 제목: “writeBoolean”public final void writeBoolean(boolean b) throws IOExceptionSpecified by:
writeBooleanin interfaceDataOutput
Parameters:
b- 출력할 boolean변수.
Throws:
IOException-
writeByte
섹션 제목: “writeByte”public final void writeByte(int b) throws IOExceptionSpecified by:
writeBytein interfaceDataOutput
Parameters:
b- 출력할 정보.
Throws:
IOException-
writeShort
섹션 제목: “writeShort”public final void writeShort(int s) throws IOExceptionSpecified by:
writeShortin interfaceDataOutput
Parameters:
s- 출력할 정보.
Throws:
IOException-
writeChar
섹션 제목: “writeChar”public final void writeChar(int c) throws IOExceptionSpecified by:
writeCharin interfaceDataOutput
Parameters:
c- 출력할 정보.
Throws:
IOException-
writeInt
섹션 제목: “writeInt”public final void writeInt(int i) throws IOExceptionSpecified by:
writeIntin interfaceDataOutput
Parameters:
i- 출력할 정보.
Throws:
IOException-
writeLong
섹션 제목: “writeLong”public final void writeLong(long l) throws IOExceptionSpecified by:
writeLongin interfaceDataOutput
Parameters:
l- 출력할 정보.
Throws:
IOException-
writeFloat
섹션 제목: “writeFloat”public final void writeFloat(float v) throws IOExceptionSpecified by:
writeFloatin interfaceDataOutput
writeDouble
섹션 제목: “writeDouble”public final void writeDouble(double v) throws IOExceptionSpecified by:
writeDoublein interfaceDataOutput
writeChars
섹션 제목: “writeChars”public final void writeChars(String s) throws IOExceptionSpecified by:
writeCharsin interfaceDataOutput
Parameters:
s- 출력할 문자열.
Throws:
IOException-
writeUTF
섹션 제목: “writeUTF”public final void writeUTF(String s) throws IOExceptionSpecified by:
writeUTFin interfaceDataOutput
Parameters:
str- 출력할 문자열.
Throws:
IOException-
AromaSoft Corp. Proprietary and Confidential
(C)opyright 2003 AromaSoft Corp. All right reserved. Contact : contact@aromasoft.com