|
JavaTM Platform Standard Ed. 6 |
|||||||||
앞의 클래스 다음의 클래스 | 프레임 있어 프레임 없음 | |||||||||
개요: 상자 | 필드 | 생성자 | 메소드 | 상세 : 필드 | 생성자 | 메소드 |
java.lang.Objectjava.io.Reader
java.io.CharArrayReader
public class CharArrayReader
문자 입력 스트림로서 사용하는 문자 버퍼를 구현합니다.
필드의 개요 | |
---|---|
protected char[] |
buf
문자 버퍼입니다. |
protected int |
count
이 버퍼의 마지막 인덱스입니다. |
protected int |
markedPos
버퍼내의 마크 위치입니다. |
protected int |
pos
현재의 버퍼의 위치입니다. |
클래스 java.io. Reader 로부터 상속된 필드 |
---|
lock |
생성자 의 개요 | |
---|---|
CharArrayReader (char[] buf)
지정된 문자의 배열로부터 CharArrayReader 를 작성합니다. |
|
CharArrayReader (char[] buf,
int offset,
int length)
지정된 문자의 배열로부터 CharArrayReader 를 작성합니다. |
메소드의 개요 | |
---|---|
void |
close ()
스트림을 닫아, 거기에 관련하는 모든 system resource를 해제합니다. |
void |
mark (int readAheadLimit)
스트림의 현재 위치에 마크를 설정합니다. |
boolean |
markSupported ()
이 스트림이, 실행하는 mark() 조작을 지원할지 어떨지를 통지합니다. |
int |
read ()
단일의 문자를 읽어들입니다. |
int |
read (char[] b,
int off,
int len)
배열의 일부에 문자를 읽어들입니다. |
boolean |
ready ()
스트림이 읽어들여 가능한 상태인가 어떤가를 통지합니다. |
void |
reset ()
직전의 마크 위치에 스트림을 리셋 합니다. |
long |
skip (long n)
문자를 스킵 합니다. |
클래스 java.io. Reader 로부터 상속된 메소드 |
---|
read , read |
클래스 java.lang. Object 로부터 상속된 메소드 |
---|
clone , equals , finalize , getClass , hashCode , notify , notifyAll , toString , wait , wait , wait |
필드의 상세 |
---|
protected char[] buf
protected int pos
protected int markedPos
protected int count
생성자 의 상세 |
---|
public CharArrayReader(char[] buf)
buf
- 입력 버퍼 (카피되어 있지 않다)public CharArrayReader(char[] buf, int offset, int length)
결과적으로 얻을 수 있는 리더는, 지정된 offset 로부터 read를 개시합니다. 이 리더로부터 읽어낼 수 있는 char 치의 총수는,length 와 buf.length-offset 의 언젠가 작은 (분)편이 됩니다.
buf
- 입력 버퍼 (카피되어 있지 않다)offset
- 읽어들이는 최초의 문자 오프셋(offset)length
- 읽어들이는 문자수
IllegalArgumentException
- offset 가 부 또는 buf.length 보다 큰 경우,length 가 부의 경우, 또는 이것들 2 개의 값의 화가 부의 경우메소드의 상세 |
---|
public int read() throws IOException
Reader
내의 read
IOException
- 입출력 에러가 발생했을 경우public int read(char[] b, int off, int len) throws IOException
Reader
내의 read
b
- 전송처 버퍼off
- 문자의 포함 개시 오프셋(offset)len
- 읽어들이는 문자의 최대수
IOException
- 입출력 에러가 발생했을 경우public long skip(long n) throws IOException
n
파라미터에는,Reader
슈퍼 클래스의 skip
메소드가 예외를 throw 하는 경우여도, 부를 설정할 수 있습니다. n
가 부의 경우, 이 메소드는 아무것도 하지 않고 0
을 돌려줍니다.
Reader
내의 skip
n
- 스킵 하는 문자수
IOException
- 스트림이 닫혀지고 있는 경우, 또는 입출력 에러가 발생했을 경우public boolean ready() throws IOException
Reader
내의 ready
IOException
- 입출력 에러가 발생했을 경우public boolean markSupported()
Reader
내의 markSupported
public void mark(int readAheadLimit) throws IOException
Reader
내의 mark
readAheadLimit
- 마크를 보관 유지하면서 읽어들일 수가 있는 문자수의 상한. 스트림에는 문자 배열로부터 입력되므로, 실제의 상한은 없다. 그 때문에, 이 인수는 무시된다
IOException
- 입출력 에러가 발생했을 경우public void reset() throws IOException
Reader
내의 reset
IOException
- 입출력 에러가 발생했을 경우public void close()
Closeable
내의 close
Reader
내의 close
|
JavaTM Platform Standard Ed. 6 |
|||||||||
앞의 클래스 다음의 클래스 | 프레임 있어 프레임 없음 | |||||||||
개요: 상자 | 필드 | 생성자 | 메소드 | 상세 : 필드 | 생성자 | 메소드 |
Copyright 2006 Sun Microsystems, Inc. All rights reserved. Use is subject to license terms . Documentation Redistribution Policy 도 참조해 주세요.