|
JavaTM 2 Platform Standard Ed. 5.0 |
|||||||||
ÀüÀÇ Å¬·¡½º ´ÙÀ½ Ŭ·¡½º | ÇÁ·¹ÀÓÀ¸·Î ÇÁ·¹ÀÓ ¾øÀÌ | |||||||||
°³¿ä: NESTED | Çʵå | constructor | ¸Þ¼µå | »ó¼¼: Çʵå | »ý¼ºÀÚ | ¸Þ¼µå |
java.lang.Objectjavax.imageio.stream.ImageInputStreamImpl
javax.imageio.stream.FileCacheImageInputStream
public class FileCacheImageInputStream
º¸Åë
ÀÇ InputStream
·Î
ºÎÅÍ ÀÔ·ÂÀ» ¾ò´Â ImageInputStream
±¸ÇöÀÔ´Ï´Ù. ÆÄÀÏÀº ÀÌÀü¿¡ ÀоîµéÀÎ µ¥ÀÌÅÍÀÇ Ä³½´·Î¼ »ç¿ëµË´Ï´Ù.
ÇÊµå °³¿ä |
---|
Ŭ·¡½º javax.imageio.stream. ImageInputStreamImpl ·ÎºÎÅÍ »ó¼ÓµÈ Çʵå |
---|
bitOffset,
byteOrder,
flushedPos,
streamPos |
»ý¼ºÀÚ °³¿ä | |
---|---|
FileCacheImageInputStream (InputStream stream,
File cacheDir)
ÁöÁ¤µÈ InputStream ·Î
ºÎÅÍ ÀоîµéÀÌ´Â FileCacheImageInputStream ¸¦ ±¸ÃàÇÕ´Ï´Ù. |
¸Þ¼µå °³¿ä | |
---|---|
void |
close ()
ÀÌ FileCacheImageInputStream ¸¦ ´Ý½À´Ï´Ù. |
boolean |
isCached ()
ÈĹ濡ÀÇ ½ÃÅ©¸¦ °¡´ÉÇÏ°Ô Çϱâ À§Çؼ ÀÌ ImageInputStream °¡ µ¥ÀÌÅ͸¦ ij½¬Çϱâ À§ÇØ, true °¡ ¸®Åϵ˴ϴÙ
. |
boolean |
isCachedFile ()
ÀÌ ImageInputStream ´Â ÆÄÀÏ Ä³½¬¸¦ À¯ÁöÇϱâ À§ÇØ, true °¡ ¸®Åϵ˴ϴÙ
. |
boolean |
isCachedMemory ()
ÀÌ ImageInputStream ´Â ¸ÞÀÎ ¸Þ¸ð¸® ij½¬¸¦ À¯ÁöÇÏÁö ¾Ê±â ¶§¹®¿¡
false °¡ ¸®Åϵ˴ϴÙ
. |
int |
read ()
½ºÆ®¸²·ÎºÎÅÍ 1 ¹ÙÀÌÆ®¸¦ Àбâ, ±×°ÍÀ» 0 ¿¡¼ 255 ±îÁöÀÇ Á¤¼ö·Î¼ ¸®ÅÏÇÕ´Ï´Ù. |
int |
read (byte[] b,
int off,
int len)
½ºÆ®¸²·ÎºÎÅÍ len ¹ÙÀÌÆ®±îÁö Àбâ, b ¿¡ À妽º off ·Î
ºÎÅÍ Æ÷ÇÔÇÕ´Ï´Ù. |
Ŭ·¡½º javax.imageio.stream. ImageInputStreamImpl ·ÎºÎÅÍ »ó¼ÓµÈ ¸Þ¼µå |
---|
checkClosed,
finalize,
flush,
flushBefore,
getBitOffset,
getByteOrder,
getFlushedPosition,
getStreamPosition,
length,
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,
seek,
setBitOffset,
setByteOrder,
skipBytes,
skipBytes |
Ŭ·¡½º java.lang. Object ·ÎºÎÅÍ »ó¼ÓµÈ ¸Þ¼µå |
---|
clone,
equals,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
»ý¼ºÀÚ »ó¼¼ |
---|
public FileCacheImageInputStream(InputStream stream, File cacheDir) throws IOException
InputStream
·Î
ºÎÅÍ ÀоîµéÀÌ´Â FileCacheImageInputStream
¸¦ ±¸ÃàÇÕ´Ï´Ù.
Àӽà ÆÄÀÏÀÌ Ä³½¬·Î¼ »ç¿ëµË´Ï´Ù. cacheDir
°¡ null
Àº ¾Æ´Ï°í, µð·ºÅ丮ÀÎ °æ¿ì, ÆÄÀÏÀÌ °Å±â¿¡ ÀÛ¼ºµË´Ï´Ù. null
ÀÎ °æ¿ì, ½Ã½ºÅÛ °íÀ¯ÀÇ µðÆúÆ® Àӽà ÆÄÀÏ µð·ºÅ丮°¡ »ç¿ëµË´Ï´Ù. ÀÚ¼¼ÇÑ °ÍÀº File.createTempFile
¹®¼¸¦ ÂüÁ¶ÇϽʽÿÀ.
stream
- ÀÐÀ» InputStream
cacheDir
- ij½¬ ÆÄÀÏÀÌ ÀÛ¼ºµÇ´Â Àå¼Ò¸¦ ³ªÅ¸³»´Â File
. ½Ã½ºÅÛ µð·ºÅ丮¸¦ »ç¿ëÇÏ´Â °æ¿ì´Â null
IllegalArgumentException
- stream
°¡ null
ÀÎ °æ¿ì
IllegalArgumentException
- cacheDir
°¡ null
Àº ¾Æ´Ï°í, µð·ºÅ丮µµ ¾Æ´Ñ °æ¿ì
IOException
- ij½¬ ÆÄÀÏÀ» ÀÛ¼ºÇÒ ¼ö ¾ø´Â °æ¿ì¸Þ¼µåÀÇ »ó¼¼ |
---|
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 boolean isCached()
ImageInputStream
°¡ µ¥ÀÌÅ͸¦ ij½¬Çϱâ À§ÇØ, true
°¡ ¸®Åϵ˴ϴÙ
.
ImageInputStream
³»ÀÇ isCached
ImageInputStreamImpl
³»ÀÇ isCached
true
isCachedMemory()
,
isCachedFile()
public boolean isCachedFile()
ImageInputStream
´Â ÆÄÀÏ Ä³½¬¸¦ À¯ÁöÇϱâ À§ÇØ, true
°¡ ¸®Åϵ˴ϴÙ
.
ImageInputStream
³»ÀÇ isCachedFile
ImageInputStreamImpl
³»ÀÇ isCachedFile
true
isCached()
,
isCachedMemory()
public boolean isCachedMemory()
ImageInputStream
´Â ¸ÞÀÎ ¸Þ¸ð¸® ij½¬¸¦ À¯ÁöÇÏÁö ¾Ê±â ¶§¹®¿¡
false
°¡ ¸®Åϵ˴ϴÙ
.
ImageInputStream
³»ÀÇ isCachedMemory
ImageInputStreamImpl
³»ÀÇ isCachedMemory
false
isCached()
,
isCachedFile()
public void close() throws IOException
FileCacheImageInputStream
¸¦ ´Ý½À´Ï´Ù. ij½¬ ÆÄÀÏÀº ´ÝÇôÁ® »èÁ¦µË´Ï´Ù. ¼Ò½º InputStream
´Â ´ÝÇôÁöÁö ¾Ê½À´Ï´Ù.
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 µµ ÂüÁ¶ÇϽʽÿÀ.