|
JavaTM 2 Platform Standard Ed. 5.0 |
|||||||||
ÀÌÀü Ŭ·¡½º ´ÙÀ½ Ŭ·¡½º | ÇÁ·¹ÀÓÀ¸·Î ÇÁ·¹ÀÓ ¾øÀÌ | |||||||||
°³¿ä: NESTED | Çʵå | constructor | ¸Þ¼µå | »ó¼¼: Çʵå | »ý¼ºÀÚ | ¸Þ¼µå |
java.lang.Objectjava.io.Reader
public abstract class Reader
¹®ÀÚ ½ºÆ®¸²À» ÀоîµéÀ̱â À§ÇÑ Ãß»ó Ŭ·¡½ºÀÔ´Ï´Ù. ¼ºê Ŭ·¡½º¿¡¼ ±¸ÇöÇÒ Çʿ䰡 ÀÖ´Â ¸Þ¼µå´Â read(char[], int, int)¿Í close() »ÓÀÔ´Ï´Ù. ´Ù¸¸, ´ëºÎºÐÀÇ ¼ºê Ŭ·¡½º¿¡¼´Â È¿À²À» ÀÚÁÖ Çϵ簡 ¶Ç´Â ±â´ÉÀ» Ãß°¡ÇÏ´Â (¶Ç´Â ±× ¾çÂÊ ¸ðµÎ) À§ÇØ, ¿©±â¼ Á¤ÀÇÇÏ´Â ¸Þ¼µåÀÇ ÀϺθ¦ ¿À¹ö¶óÀ̵å(override) ÇÕ´Ï´Ù.
BufferedReader
,
LineNumberReader
,
CharArrayReader
,
InputStreamReader
,
FileReader
,
FilterReader
,
PushbackReader
,
PipedReader
,
StringReader
,
Writer
ÇÊµå °³¿ä | |
---|---|
protected Object |
lock
ÀÌ ½ºÆ®¸²·Î Á¶ÀÛÀ» µ¿±â ½Ã۴µ¥ »ç¿ëÇÏ´Â °´Ã¼ÀÔ´Ï´Ù. |
»ý¼ºÀÚ °³¿ä | |
---|---|
protected |
Reader ()
±× À§±âÀÎ ¼½¼ÇÀÌ ¸®´õ ÀÚü·Î µ¿±â ÇÏ´Â »õ·Î¿î ¹®ÀÚ ½ºÆ®¸² ¸®´õ¸¦ ÀÛ¼ºÇÕ´Ï´Ù. |
protected |
Reader (Object lock)
±× À§±âÀÎ ¼½¼ÇÀÌ ÁöÁ¤µÈ °´Ã¼·Î µ¿±â ÇÏ´Â »õ·Î¿î ¹®ÀÚ ½ºÆ®¸² ¸®´õ¸¦ ÀÛ¼ºÇÕ´Ï´Ù. |
¸Þ¼µå °³¿ä | |
---|---|
abstract void |
close ()
½ºÆ®¸²À» ´Ý½À´Ï´Ù. |
void |
mark (int readAheadLimit)
½ºÆ®¸²ÀÇ ÇöÀçÀÇ À§Ä¡¿¡ ¸¶Å©¸¦ ¼³Á¤ÇÕ´Ï´Ù. |
boolean |
markSupported ()
ÀÌ ½ºÆ®¸²ÀÌ mark() ¿ÀÆÛ·¹À̼ÇÀ» Áö¿ø ÇÒÁö ¾î¶³Áö¸¦ ÆÇÁ¤ÇÕ´Ï´Ù. |
int |
read ()
´ÜÀÏ ¹®ÀÚ¸¦ ÀоîµéÀÔ´Ï´Ù. |
int |
read (char[] cbuf)
¹è¿¿¡ ¹®ÀÚ¸¦ ÀоîµéÀÔ´Ï´Ù. |
abstract int |
read (char[] cbuf,
int off,
int len)
¹è¿ÀÇ ÀϺο¡ ¹®ÀÚ¸¦ ÀоîµéÀÔ´Ï´Ù. |
int |
read (CharBuffer target)
ÁöÁ¤µÈ ¹®ÀÚ ¹öÆÛ¿¡ ¹®ÀÚ¸¦ ÀоîµéÀÌ·Á°í ÇÕ´Ï´Ù. |
boolean |
ready ()
ÀÌ ½ºÆ®¸²ÀÌ Àб⠰¡´ÉÇѰ¡ ¾î¶²°¡¸¦ ÆÇÁ¤ÇÕ´Ï´Ù. |
void |
reset ()
½ºÆ®¸²À» ¸®¼Â ÇÕ´Ï´Ù. |
long |
skip (long n)
¹®ÀÚ¸¦ ½ºÅµ ÇÕ´Ï´Ù. |
Ŭ·¡½º java.lang. Object ·ÎºÎÅÍ »ó¼ÓµÈ ¸Þ¼µå |
---|
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
ÇʵåÀÇ »ó¼¼ |
---|
protected Object lock
»ý¼ºÀÚ »ó¼¼ |
---|
protected Reader()
protected Reader(Object lock)
lock
- µ¿±â ÇÏ´Â °´Ã¼¸Þ¼µåÀÇ »ó¼¼ |
---|
public int read(CharBuffer target) throws IOException
Readable
³»ÀÇ read
target
- ¹®ÀÚ¸¦ ÀоîµéÀÌ´Â ¹öÆÛ
IOException
- ÀÔÃâ·Â ¿¡·¯°¡ ¹ß»ýÇßÀ» °æ¿ì
NullPointerException
- Ÿ°ÙÀÌ nullÀÎ °æ¿ì
ReadOnlyBufferException
- Ÿ°ÙÀÌ Àбâ Àü¿ë
ÀÇ ¹öÆÛÀÇ °æ¿ìpublic int read() throws IOException
À¯È¿ÇÑ ´ÜÀÏ ¹®ÀÚÀÇ ÀÔ·ÂÀ» Áö¿ø Çϱâ À§ÇÑ ¼ºê Ŭ·¡½º¿¡¼´Â ÀÌ ¸Þ¼µå¸¦ ¿À¹ö¶óÀ̵å(override) ÇÕ´Ï´Ù.
IOException
- ÀÔÃâ·Â ¿¡·¯°¡ ¹ß»ýÇßÀ» °æ¿ìpublic int read(char[] cbuf) throws IOException
cbuf
- Àü¼Ûó ¹öÆÛ
IOException
- ÀÔÃâ·Â ¿¡·¯°¡ ¹ß»ýÇßÀ» °æ¿ìpublic abstract int read(char[] cbuf, int off, int len) throws IOException
cbuf
- Àü¼Ûó ¹öÆÛoff
- ¹®ÀÚÀÇ Æ÷ÇÔ °³½Ã ¿ÀÇÁ¼Â(offset)len
- ÀоîµéÀÌ´Â ¹®ÀÚÀÇ ÃÖ´ë¼ö
IOException
- ÀÔÃâ·Â ¿¡·¯°¡ ¹ß»ýÇßÀ» °æ¿ìpublic long skip(long n) throws IOException
n
- ½ºÅµ ÇÏ´Â ¹®ÀÚ¼ö
IllegalArgumentException
- n
°¡ À߸øµÈ °ª
ÀÇ °æ¿ì
IOException
- ÀÔÃâ·Â ¿¡·¯°¡ ¹ß»ýÇßÀ» °æ¿ìpublic boolean ready() throws IOException
IOException
- ÀÔÃâ·Â ¿¡·¯°¡ ¹ß»ýÇßÀ» °æ¿ìpublic boolean markSupported()
public void mark(int readAheadLimit) throws IOException
readAheadLimit
- ¸¶Å©¸¦ º¸°ü À¯ÁöÇÏ¸é¼ ÀоîµéÀÏ ¼ö ÀÖ´Â ¹®ÀÚ¼öÀÇ »óÇÑ. ÀÌ ¼öÀÇ ¹®ÀÚ¸¦ ÀоîµéÀÎ ÈÄ¿¡ ½ºÆ®¸²À» ¸®¼Â ÇÏ·Á°í ÇÏ¸é ½ÇÆÐÇÏ´Â °æ¿ì°¡ ÀÖ´Ù
IOException
- ½ºÆ®¸²ÀÌ mark()¸¦ Áö¿ø
ÇÏÁö ¾Ê´Â °æ¿ì, ¶Ç´Â ±× ¿ÜÀÇ ÀÔÃâ·Â ¿¡·¯°¡ ¹ß»ýÇßÀ» °æ¿ìpublic void reset() throws IOException
IOException
- ½ºÆ®¸²¿¡ ¸¶Å©°¡ ¼³Á¤µÇÁö ¾Ê¾Ò´ø °æ¿ì, ¶Ç´Â ¸¶Å©ÀÇ ¼³Á¤ÀÌ ¹«È¿°¡ µÇ¾úÀ» °æ¿ì, ¶Ç´Â ½ºÆ®¸²ÀÌ reset()¸¦ Áö¿ø
ÇÏÁö ¾Ê´Â °æ¿ì, ¶Ç´Â ´Ù¸¥ ÀÔÃâ·Â ¿¡·¯°¡ ¹ß»ýÇßÀ» °æ¿ìpublic abstract void close() throws IOException
Closeable
³»ÀÇ close
IOException
- ÀÔÃâ·Â ¿¡·¯°¡ ¹ß»ýÇßÀ» °æ¿ì
|
JavaTM 2 Platform Standard Ed. 5.0 |
|||||||||
ÀÌÀü Ŭ·¡½º ´ÙÀ½ Ŭ·¡½º | ÇÁ·¹ÀÓÀ¸·Î ÇÁ·¹ÀÓ ¾øÀÌ | |||||||||
°³¿ä: NESTED | Çʵå | constructor | ¸Þ¼µå | »ó¼¼: Çʵå | »ý¼ºÀÚ | ¸Þ¼µå |
Copyright 2004 Sun Microsystems, Inc. All rights reserved. Use is subject to license terms . Documentation Redistribution Policy µµ ÂüÁ¶ÇϽʽÿÀ.