|
JavaTM 2 Platform Standard Ed. 5.0 |
|||||||||
ÀÌÀü Ŭ·¡½º ´ÙÀ½ Ŭ·¡½º | ÇÁ·¹ÀÓÀ¸·Î ÇÁ·¹ÀÓ ¾øÀÌ | |||||||||
°³¿ä: NESTED | Çʵå | constructor | ¸Þ¼µå | »ó¼¼: Çʵå | »ý¼ºÀÚ | ¸Þ¼µå |
java.lang.Objectjavax.imageio.stream.ImageInputStreamImpl
javax.imageio.stream.FileImageInputStream
public class FileImageInputStream
File
¶Ç´Â RandomAccessFile
·ÎºÎÅÍ ÀÔ·ÂÀ» ¾ò´Â
ImageInputStream
±¸ÇöÀÔ´Ï´Ù. ÆÄÀÏÀÇ ³»¿ëÀº, ¿ÀºêÁ§Æ®ÀÇ À¯È¿±â°£ÁßÀº ¾ÈÁ¤µÇ¾î ÀÖ´Ù°í º¸¿©Áý´Ï´Ù.
ÇÊµå °³¿ä |
---|
Ŭ·¡½º javax.imageio.stream. ImageInputStreamImpl ·ÎºÎÅÍ »ó¼ÓµÈ Çʵå |
---|
bitOffset,
byteOrder,
flushedPos,
streamPos |
»ý¼ºÀÚ °³¿ä | |
---|---|
FileImageInputStream (File f)
ÁöÁ¤µÈ File ·ÎºÎÅÍ ÀоîµéÀÌ´Â FileImageInputStream ¸¦
±¸ÃàÇÕ´Ï´Ù. |
|
FileImageInputStream (RandomAccessFile raf)
ÁöÁ¤µÈ RandomAccessFile ·ÎºÎÅÍ ÀоîµéÀÌ´Â FileImageInputStream ¸¦
±¸ÃàÇÕ´Ï´Ù. |
¸Þ¼µå °³¿ä | |
---|---|
void |
close ()
½ºÆ®¸²À» ´Ý½À´Ï´Ù. |
long |
length ()
±âº»ÀÌ µÇ´Â ÆÄÀÏÀÇ ±æÀÌ, ¶Ç´Â ±×°ÍÀÌ ºÒ¸íÇÑ °æ¿ì´Â -1 À»
µ¹·ÁÁÝ´Ï´Ù. |
int |
read ()
½ºÆ®¸²·ÎºÎÅÍ 1 ¹ÙÀÌÆ®¸¦ Àоîµé¿©, ±×°ÍÀ» 0 ¿¡¼ 255 ±îÁöÀÇ Á¤¼ö·Î¼ µ¹·ÁÁÝ´Ï´Ù. |
int |
read (byte[] b,
int off,
int len)
½ºÆ®¸²·ÎºÎÅÍ len ¹ÙÀÌÆ®±îÁö Àоîµé¿©,b ¿¡ À妽º off ·ÎºÎÅÍ Æ÷ÇÔÇÕ´Ï´Ù. |
void |
seek (long pos)
ÇöÀçÀÇ ½ºÆ®¸² À§Ä¡¸¦ ¸ñÀûÀÇ À§Ä¡·Î ¼³Á¤ÇÕ´Ï´Ù. |
Ŭ·¡½º javax.imageio.stream. ImageInputStreamImpl ·ÎºÎÅÍ »ó¼ÓµÈ ¸Þ¼µå |
---|
checkClosed,
finalize,
flush,
flushBefore,
getBitOffset,
getByteOrder,
getFlushedPosition,
getStreamPosition,
isCached,
isCachedFile,
isCachedMemory,
mark,
read,
readBit,
readBits,
readBoolean,
readByte,
readBytes,
readChar,
readDouble,
readFloat,
readFully,
readFully,
readFully,
readFully,
readFully,
readFully,
readFully,
readFully,
readInt,
readLine,
readLong,
readShort,
readUnsignedByte,
readUnsignedInt,
readUnsignedShort,
readUTF,
reset,
setBitOffset,
setByteOrder,
skipBytes,
skipBytes |
Ŭ·¡½º java.lang. Object ·ÎºÎÅÍ »ó¼ÓµÈ ¸Þ¼µå |
---|
clone,
equals,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
»ý¼ºÀÚ »ó¼¼ |
---|
public FileImageInputStream(File f) throws FileNotFoundException, IOException
File
·ÎºÎÅÍ ÀоîµéÀÌ´Â FileImageInputStream
¸¦
±¸ÃàÇÕ´Ï´Ù.
ÀÌ ¿ÀºêÁ§Æ®ÀÇ ±¸Ãà½ÃºÎÅÍ Àоîµé¿© ¸Þ¼µå¸¦ ¸¶Áö¸·À¸·Î È£ÃâÇÒ ¶§±îÁö, ÆÄÀÏÀÇ ³»¿ëÀ» º¯°æÇØ µÇÁö ¾Ê½À´Ï´Ù.
f
- read¿øÀÇ File
IllegalArgumentException
- f
°¡ null
°æ¿ì
SecurityException
- ½ÃÅ¥·¯Æ¼ ¸Å´ÏÀú°¡ Á¸ÀçÇØ, ÆÄÀÏ¿¡ÀÇ Àоîµé¿© ¾×¼¼½º°¡ Çã°¡µÇÁö ¾Ê´Â °æ¿ì
FileNotFoundException
- f
°¡ µð·ºÅ丮ÀÎÁö, ´Ù¸¥ ¾î¶°ÇÑ ÀÌÀ¯·Î½á Àоîµé¿©¿ëÀ¸·Î ¿ ¼ö°¡ ¾ø´Â °æ¿ì
IOException
- ÀÔÃâ·Â ¿¡·¯°¡ ¹ß»ýÇßÀ» °æ¿ìpublic FileImageInputStream(RandomAccessFile raf)
RandomAccessFile
·ÎºÎÅÍ ÀоîµéÀÌ´Â FileImageInputStream
¸¦
±¸ÃàÇÕ´Ï´Ù.
ÀÌ ¿ÀºêÁ§Æ®ÀÇ ±¸Ãà½ÃºÎÅÍ Àоîµé¿© ¸Þ¼µå¸¦ ¸¶Áö¸·À¸·Î È£ÃâÇÒ ¶§±îÁö, ÆÄÀÏÀÇ ³»¿ëÀ» º¯°æÇØ µÇÁö ¾Ê½À´Ï´Ù.
raf
- read¿øÀÇ RandomAccessFile
IllegalArgumentException
- raf
°¡ null
°æ¿ì¸Þ¼µåÀÇ »ó¼¼ |
---|
public int read() throws IOException
ImageInputStream
±â¼ú: ½ºÆ®¸²³»ÀÇ ºñÆ® ¿ÀÇÁ¼Â(offset)´Â read¸¦ ½Ç½ÃÇϱâ Àü¿¡ 0 ¿¡ ¸®¼ÂÆ® µË´Ï´Ù.
ImageInputStream
³»ÀÇ read
ImageInputStreamImpl
³»ÀÇ read
IOException
- ÀÔÃâ·Â ¿¡·¯°¡ ¹ß»ýÇßÀ» °æ¿ìpublic int read(byte[] b, int off, int len) throws IOException
ImageInputStreamImpl
񃬣: len
¹ÙÀÌÆ®±îÁö Àоîµé¿©,b
¿¡ À妽º off
·ÎºÎÅÍ Æ÷ÇÔÇÕ´Ï´Ù. ÀоîµéÀÎ ¹ÙÀÌÆ®¼ö¸¦ µ¹·ÁÁÝ´Ï´Ù. ½ºÆ®¸²ÀÇ ³¡¿¡ À̸£·¶±â ¶§¹®¿¡ ¹ÙÀÌÆ®¸¦ ÀоîµéÀÏ ¼ö ¾ø´Â °æ¿ì´Â
-1À»
µ¹·ÁÁÝ´Ï´Ù.
½ºÆ®¸²³»ÀÇ ºñÆ® ¿ÀÇÁ¼Â(offset)´Â read¸¦ ½Ç½ÃÇϱâ Àü¿¡ 0 ¿¡ ¸®¼ÂÆ® ÇÒ Çʿ䰡 ÀÖ½À´Ï´Ù.
¼ºê Ŭ·¡½º¿¡¼ ÀÌ ¸Þ¼µå¸¦ ±¸ÇöÇÒ Çʿ䰡 ÀÖ½À´Ï´Ù. ¼ºê Ŭ·¡½º ±¸ÇöÀ¸·Î Á¾·áÇϱâ Àü¿¡ ½ºÆ®¸² À§Ä¡¸¦ °»½ÅÇÕ´Ï´Ù.
ImageInputStream
³»ÀÇ read
ImageInputStreamImpl
³»ÀÇ read
b
- ±âÀÔÇØÁö´Â ¹ÙÀÌÆ® ¹è¿off
- ±âÀÔóÀÇ b
³»ÀÇ °³½Ã À§Ä¡len
- ÀоîµéÀÌ´Â ÃÖ´ë ¹ÙÀÌÆ®¼ö
-1
IOException
- ÀÔÃâ·Â ¿¡·¯°¡ ¹ß»ýÇßÀ» °æ¿ìpublic long length()
-1
À»
µ¹·ÁÁÝ´Ï´Ù.
ImageInputStream
³»ÀÇ length
ImageInputStreamImpl
³»ÀÇ length
long
), ¶Ç´Â -1
public void seek(long pos) throws IOException
ImageInputStream
񃬣: pos
°¡ getflushedPosition
·ÎºÎÅÍ µ¹·ÁÁÖ°íÁö´Â Ç÷¡½Ã À§Ä¡º¸´Ù ÀÛÀº °æ¿ì´Â
IndexOutOfBoundsException
°¡ Throw µË´Ï´Ù.
½ÃÅ©·Î ÆÄÀÏÀÇ ¸¶Áö¸·À» Åë°úÇÏ´Â °ÍÀº Á¤»óÀûÀ̰í,EOFException
´Â
ÀÐÀ» °æ¿ì¸¸ Throw µË´Ï´Ù.
ImageInputStream
³»ÀÇ seek
ImageInputStreamImpl
³»ÀÇ seek
pos
- ¸ñÀûÀÇ ÆÄÀÏ Æ÷ÀÎÅÍ À§Ä¡¸¦ ³ªÅ¸³»´Â long
IOException
- ±× ¿ÜÀÇ ÀÔÃâ·Â ¿¡·¯°¡ ¹ß»ýÇßÀ» °æ¿ìpublic void close() throws IOException
ImageInputStream
񃬣: IOException
°¡ Throw µÉ±î ºÎÁ¤ÇÑ µ¿ÀÛÀÌ ½ÇÇàµÇ´Â °æ¿ì°¡ ÀÖ½À´Ï´Ù. ÀÌ ¸Þ¼µå¸¦ È£ÃâÇϸé, ÀÌ ÀÎÅÍÆäÀ̽º¸¦ ±¸ÇöÇϴ Ŭ·¡½º°¡, ¸Þ¸ð¸®, µð½ºÅ© ½ºÆäÀ̽º, ¶Ç´Â ÆÄÀÏ ±â¼úÀÚµîÀÇ ½ºÆ®¸²¿¡ °ü·ÃµÈ ÀÚ¿øÀ» ÇØ¹æÇÒ ¼ö ÀÖ½À´Ï´Ù.
ImageInputStream
³»ÀÇ close
ImageInputStreamImpl
³»ÀÇ 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 µµ ÂüÁ¶ÇϽʽÿÀ.