|
JavaTM 2 Platform Standard Ed. 5.0 |
|||||||||
ÀÌÀü Ŭ·¡½º ´ÙÀ½ Ŭ·¡½º | ÇÁ·¹ÀÓÀ¸·Î ÇÁ·¹ÀÓ ¾øÀÌ | |||||||||
°³¿ä: NESTED | Çʵå | constructor | ¸Þ¼µå | »ó¼¼: Çʵå | »ý¼ºÀÚ | ¸Þ¼µå |
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 ()
½ºÆ®¸²À» ´Ý½À´Ï´Ù. |
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 À§Ä¡·ÎºÎÅÍ µ¶Çظ¦ °³½ÃÇÕ´Ï´Ù. ÀÌ ¸®´õ·ÎºÎÅÍ Àо ¼ö ÀÖ´Â 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
Reader
½´ÆÛ Ŭ·¡½ºÀÇ skip
¸Þ¼µå°¡ ¿¹¿Ü¸¦ Throw ÇÏ´Â °æ¿ì¿¡¼µµ, n
ÆÄ¶ó¹ÌÅÍ¿¡´Â ºÎÀÇ ¼ö¸¦ ÁöÁ¤ÇÒ ¼ö ÀÖ½À´Ï´Ù. 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 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 µµ ÂüÁ¶ÇϽʽÿÀ.