|
JavaTM 2 Platform Standard Ed. 5.0 |
|||||||||
ÀÌÀü Ŭ·¡½º ´ÙÀ½ Ŭ·¡½º | ÇÁ·¹ÀÓÀ¸·Î ÇÁ·¹ÀÓ ¾øÀÌ | |||||||||
°³¿ä: NESTED | Çʵå | constructor | ¸Þ¼µå | »ó¼¼: Çʵå | »ý¼ºÀÚ | ¸Þ¼µå |
java.lang.Objectjava.io.Reader
java.io.StringReader
public class StringReader
¼Ò½º°¡ ij¸¯ÅÍ ¶óÀÎÀÇ ¹®ÀÚ ½ºÆ®¸²ÀÔ´Ï´Ù.
ÇÊµå °³¿ä |
---|
Ŭ·¡½º java.io. Reader ·ÎºÎÅÍ »ó¼ÓµÈ Çʵå |
---|
lock |
»ý¼ºÀÚ °³¿ä | |
---|---|
StringReader (String s)
»õ·Î¿î ij¸¯ÅÍ ¶óÀÎ ¸®´õ¸¦ ÀÛ¼ºÇÕ´Ï´Ù. |
¸Þ¼µå °³¿ä | |
---|---|
void |
close ()
½ºÆ®¸²À» ´Ý½À´Ï´Ù. |
void |
mark (int readAheadLimit)
½ºÆ®¸²ÀÇ ÇöÀç À§Ä¡¿¡ ¸¶Å©¸¦ ¼³Á¤ÇÕ´Ï´Ù. |
boolean |
markSupported ()
ÀÌ ½ºÆ®¸²ÀÌ, ½ÇÇàÇÏ´Â mark() Á¶ÀÛÀ» Áö¿ø ÇÒÁö ¾î¶³Áö¸¦ ÅëÁöÇÕ´Ï´Ù. |
int |
read ()
´ÜÀÏÀÇ ¹®ÀÚ¸¦ ÀоîµéÀÔ´Ï´Ù. |
int |
read (char[] cbuf,
int off,
int len)
¹è¿ÀÇ ÀϺο¡ ¹®ÀÚ¸¦ ÀоîµéÀÔ´Ï´Ù. |
boolean |
ready ()
ÀÌ ½ºÆ®¸²ÀÌ Àб⠰¡´ÉÇѰ¡ ¾î¶²°¡¸¦ ÆÇÁ¤ÇÕ´Ï´Ù. |
void |
reset ()
Á÷ÀüÀÇ ¸¶Å© À§Ä¡¿¡ ½ºÆ®¸²À» ¸®¼Â ÇÕ´Ï´Ù. |
long |
skip (long ns)
½ºÆ®¸²³»ÀÇ ÁöÁ¤ÀÇ ¹®ÀÚ¼ö¸¦ ½ºÅµ ÇÕ´Ï´Ù. |
Ŭ·¡½º java.io. Reader ·ÎºÎÅÍ »ó¼ÓµÈ ¸Þ¼µå |
---|
read,
read |
Ŭ·¡½º java.lang. Object ·ÎºÎÅÍ »ó¼ÓµÈ ¸Þ¼µå |
---|
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
»ý¼ºÀÚ »ó¼¼ |
---|
public StringReader(String s)
s
- ¹®ÀÚ ½ºÆ®¸²À» Á¦°øÇϴ ij¸¯ÅÍ ¶óÀθ޼µåÀÇ »ó¼¼ |
---|
public int read() throws IOException
Reader
³»ÀÇ read
IOException
- ÀÔÃâ·Â ¿¡·¯°¡ ¹ß»ýÇßÀ» °æ¿ìpublic int read(char[] cbuf, int off, int len) throws IOException
Reader
³»ÀÇ read
cbuf
- Àü¼Ûó ¹öÆÛoff
- ¹®ÀÚÀÇ Ãâ·Â °³½Ã ¿ÀÇÁ¼Â(offset)len
- ÀоîµéÀÌ´Â ¹®ÀÚÀÇ ÃÖ´ë¼ö
IOException
- ÀÔÃâ·Â ¿¡·¯°¡ ¹ß»ýÇßÀ» °æ¿ìpublic long skip(long ns) throws IOException
Reader
½´ÆÛ Ŭ·¡½ºÀÇ skip
¸Þ¼µå°¡ ¿¹¿Ü¸¦ Throw ÇÏ´Â °æ¿ì¿¡¼µµ, ns
ÆÄ¶ó¹ÌÅÍÀÇ °ªÀÌ ºÎÀÎ ÀÏÀÌ ÀÖ½À´Ï´Ù. ns
°ªÀÌ ºÎÀÇ °æ¿ì, ½ºÆ®¸²Àº ÈĹ濡 ½ºÅµ ÇÕ´Ï´Ù. ¹Ýȯ°ªÀÇ °ªÀÌ ºÎÀÇ °æ¿ì, ÈĹ濡ÀÇ ½ºÅµÀ» ÇÑ °ÍÀÌ µË´Ï´Ù. ij¸¯ÅÍ ¶óÀÎÀÇ °³½Ã À§Ä¡¿¡¼(º¸´Ù) ÈĹ濡 ½ºÅµ ÇÒ ¼ö ¾ø½À´Ï´Ù.
ij¸¯ÅÍ ¶óÀÎ Àüü°¡ ÀоÁ³À» °æ¿ì, ¶Ç´Â ½ºÅµ µÇ¾úÀ» °æ¿ì, ÀÌ ¸Þ¼µå´Â ¾Æ¹«°Íµµ ½Ç½ÃÇÏÁö ¾Ê°í, Ç×»ó 0À» ¸®ÅÏÇÕ´Ï´Ù.
Reader
³»ÀÇ skip
ns
- ½ºÅµ ÇÏ´Â ¹®ÀÚ¼ö
IOException
- ÀÔÃâ·Â ¿¡·¯°¡ ¹ß»ýÇßÀ» °æ¿ìpublic boolean ready() throws IOException
Reader
³»ÀÇ ready
IOException
- ½ºÆ®¸²ÀÌ ´ÝÇôÁ³À» °æ¿ìpublic boolean markSupported()
Reader
³»ÀÇ markSupported
public void mark(int readAheadLimit) throws IOException
Reader
³»ÀÇ mark
readAheadLimit
- ¸¶Å©¸¦ º¸°ü À¯ÁöÇÏ¸é¼ ÀоîµéÀÏ ¼ö ÀÖ´Â ¹®ÀÚ¼öÀÇ »óÇÑ. ½ºÆ®¸²¿¡´Â ij¸¯ÅÍ ¶óÀÎÀ¸·ÎºÎÅÍ ÀԷµǹǷΠ½ÇÁ¦ÀÇ »óÇÑÀº ¾ø´Ù. ±× ¶§¹®¿¡
ÀÌ Àμö´Â À߸øµÈ °ªÀ̾ ¾È µÈ´Ù. ±×·¸Áö ¾ÊÀº °æ¿ì´Â ¹«½ÃµÈ´Ù
IllegalArgumentException
- readAheadLimit°¡ À߸øµÈ °ª
ÀÇ °æ¿ì
IOException
- ÀÔÃâ·Â ¿¡·¯°¡ ¹ß»ýÇßÀ» °æ¿ìpublic void reset() throws IOException
Reader
³»ÀÇ reset
IOException
- ÀÔÃâ·Â ¿¡·¯°¡ ¹ß»ýÇßÀ» °æ¿ìpublic void close()
Closeable
³»ÀÇ close
Reader
³»ÀÇ close
|
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 µµ ÂüÁ¶ÇϽʽÿÀ.