Class ByteArrayInputStream
package java.io
java.lang.Object | +--java.io.InputStream | +--java.io.ByteArrayInputStreamextends InputStream:
바이트 형 정보의 입력 스트림을 구현한 클래스.
필드 요약
섹션 제목: “필드 요약”protected byte[] buf— 바이트형 정보가 저장된 버퍼.protected int count— buf에 저장된 바이트 정보량.protected int mark— mark기능을 위한 위치정보 저장변수.protected int pos— buf내에서 다음에 읽을 위치.
생성자 요약
섹션 제목: “생성자 요약”- ByteArrayInputStream (byte[] buf) 특정 바이트 배열 정보를 읽을 수 있도록 새로운 ByteArrayInputStream 객체를 생성한다.
- ByteArrayInputStream (byte[] buf, int offset, int length) 특정 바이트 배열 정보 중 일부분를 읽을 수 있도록 새로운 ByteArrayInputStream 객체를 생성한다.
메서드 요약
섹션 제목: “메서드 요약”int available ()— 현 압력 스트림으로 부터 읽을 수 있는 정보의 갯수를 구한다.void close ()— 입력스트림을 닫는다.void mark (int readlimit)— 입력 스트림 내에서 mark정보를 저장한다.boolean markSupported ()— mark기능을 지원하는지 여부를 구한다.int read ()— 입력 스트림으로 부터 한 바이트 정보를 읽는다.int read (byte[] buf, int offset, int len)— 입력 스트림으로 부터 특정 배열로 바이트 정보를 읽는다.void reset ()— 입력 스트림 내에서 다음에 읽을 위치를 mark메소드를 통해 저장한 값으로 복원한다.long skip (long num_bytes)— 입력 스트림을 읽지 않고 특정 갯수만큼 건너 뛴다.
필드 상세
섹션 제목: “필드 상세”buf
섹션 제목: “buf”protected byte[] buf- 바이트형 정보가 저장된 버퍼.
pos
섹션 제목: “pos”protected int pos- buf내에서 다음에 읽을 위치.
mark
섹션 제목: “mark”protected int mark- mark기능을 위한 위치정보 저장변수.
count
섹션 제목: “count”protected int count- buf에 저장된 바이트 정보량.
ByteArrayInputStream
섹션 제목: “ByteArrayInputStream”public ByteArrayInputStream(byte[] buf)Parameters:
buf- 입력스트림을 만들 대상.
ByteArrayInputStream
섹션 제목: “ByteArrayInputStream”public ByteArrayInputStream(byte[] buf, int offset, int length)Parameters:
length- 입력스트림을 만들 대상의 길이.
close
섹션 제목: “close”public void close() throws IOExceptionOverrides:
closein classInputStream- Following copied from class:
java.io.InputStream
Throws:
IOException-
available
섹션 제목: “available”public int available()Overrides:
availablein classInputStream
Returns:
- 현 압력 스트림으로 부터 읽을 수 있는 정보의 갯수.
markSupported
섹션 제목: “markSupported”public boolean markSupported()Overrides:
markSupportedin classInputStream
Returns:
- 항상 true.
mark
섹션 제목: “mark”public void mark(int readlimit)Overrides:
markin classInputStream
reset
섹션 제목: “reset”public void reset()Overrides:
resetin classInputStream- Following copied from class:
java.io.InputStream
Throws:
IOException-
skip
섹션 제목: “skip”public long skip(long num_bytes) throws IOExceptionOverrides:
skipin classInputStream
Parameters:
num_bytes- 건너 뛸 갯수.
Returns:
- 실제 건너 뛴 갯수.
read
섹션 제목: “read”public int read()Overrides:
readin classInputStream
Returns:
- 읽을 내용이 없으면 -1 아니면 읽은 값.
read
섹션 제목: “read”public int read(byte[] buf, int offset, int len)Overrides:
readin classInputStream
Parameters:
len- 읽고자 하는 갯수.
Returns:
- 읽을 내용이 없으면 -1 아니면 실제 읽은 갯수.## 생성자 상세
ByteArrayInputStream
섹션 제목: “ByteArrayInputStream”public ByteArrayInputStream(byte[] buf)Parameters:
buf- 입력스트림을 만들 대상.
ByteArrayInputStream
섹션 제목: “ByteArrayInputStream”public ByteArrayInputStream(byte[] buf, int offset, int length)Parameters:
length- 입력스트림을 만들 대상의 길이.
close
섹션 제목: “close”public void close() throws IOExceptionOverrides:
closein classInputStream- Following copied from class:
java.io.InputStream
Throws:
IOException-
available
섹션 제목: “available”public int available()Overrides:
availablein classInputStream
Returns:
- 현 압력 스트림으로 부터 읽을 수 있는 정보의 갯수.
markSupported
섹션 제목: “markSupported”public boolean markSupported()Overrides:
markSupportedin classInputStream
Returns:
- 항상 true.
mark
섹션 제목: “mark”public void mark(int readlimit)Overrides:
markin classInputStream
reset
섹션 제목: “reset”public void reset()Overrides:
resetin classInputStream- Following copied from class:
java.io.InputStream
Throws:
IOException-
skip
섹션 제목: “skip”public long skip(long num_bytes) throws IOExceptionOverrides:
skipin classInputStream
Parameters:
num_bytes- 건너 뛸 갯수.
Returns:
- 실제 건너 뛴 갯수.
read
섹션 제목: “read”public int read()Overrides:
readin classInputStream
Returns:
- 읽을 내용이 없으면 -1 아니면 읽은 값.
read
섹션 제목: “read”public int read(byte[] buf, int offset, int len)Overrides:
readin classInputStream
Parameters:
len- 읽고자 하는 갯수.
Returns:
- 읽을 내용이 없으면 -1 아니면 실제 읽은 갯수.## 메서드 상세
close
섹션 제목: “close”public void close() throws IOExceptionOverrides:
closein classInputStream- Following copied from class:
java.io.InputStream
Throws:
IOException-
available
섹션 제목: “available”public int available()Overrides:
availablein classInputStream
Returns:
- 현 압력 스트림으로 부터 읽을 수 있는 정보의 갯수.
markSupported
섹션 제목: “markSupported”public boolean markSupported()Overrides:
markSupportedin classInputStream
Returns:
- 항상 true.
mark
섹션 제목: “mark”public void mark(int readlimit)Overrides:
markin classInputStream
reset
섹션 제목: “reset”public void reset()Overrides:
resetin classInputStream- Following copied from class:
java.io.InputStream
Throws:
IOException-
skip
섹션 제목: “skip”public long skip(long num_bytes) throws IOExceptionOverrides:
skipin classInputStream
Parameters:
num_bytes- 건너 뛸 갯수.
Returns:
- 실제 건너 뛴 갯수.
read
섹션 제목: “read”public int read()Overrides:
readin classInputStream
Returns:
- 읽을 내용이 없으면 -1 아니면 읽은 값.
read
섹션 제목: “read”public int read(byte[] buf, int offset, int len)Overrides:
readin classInputStream
Parameters:
len- 읽고자 하는 갯수.
Returns:
- 읽을 내용이 없으면 -1 아니면 실제 읽은 갯수.
AromaSoft Corp. Proprietary and Confidential
(C)opyright 2003 AromaSoft Corp. All right reserved. Contact : contact@aromasoft.com