|
JavaTM 2 Platform Standard Ed. 5.0 |
|||||||||
| ÀÌÀü Ŭ·¡½º ´ÙÀ½ Ŭ·¡½º | ÇÁ·¹ÀÓÀ¸·Î ÇÁ·¹ÀÓ ¾øÀÌ | |||||||||
| °³¿ä: NESTED | Çʵå | constructor | ¸Þ¼µå | »ó¼¼: Çʵå | »ý¼ºÀÚ | ¸Þ¼µå | |||||||||
java.lang.Objectjavax.imageio.stream.ImageInputStreamImpl
javax.imageio.stream.ImageOutputStreamImpl
javax.imageio.stream.FileCacheImageOutputStream
public class FileCacheImageOutputStream
Ãâ·ÂÀ» º¸Åë
ÀÇ OutputStream¿¡ Ãâ·ÂÇÏ´Â ImageOutputStream
±¸ÇöÀÔ´Ï´Ù. ÆÄÀÏÀº µ¥ÀÌÅ͸¦ Ãâ·Â ½ºÆ®¸²¿¡ Ç÷¡½Ã ÇÒ ¶§±îÁö ij½¬·Î¼ »ç¿ëµË´Ï´Ù.
| ÇÊµå °³¿ä |
|---|
| Ŭ·¡½º javax.imageio.stream. ImageInputStreamImpl À¸·ÎºÎÅÍ »ó¼ÓµÈ Çʵå |
|---|
bitOffset,
byteOrder,
flushedPos,
streamPos |
| »ý¼ºÀÚ °³¿ä | |
|---|---|
FileCacheImageOutputStream (OutputStream stream,
File cacheDir)
ÁöÁ¤µÈ outputStream¿¡
ÀÇ write¸¦ ½Ç½ÃÇÏ´Â FileCacheImageOutputStream¸¦ ±¸ÃàÇÕ´Ï´Ù. |
|
| ¸Þ¼µå °³¿ä | |
|---|---|
void |
close ()
ÀÌ FileCacheImageOututStream¸¦ ´Ý½À´Ï´Ù. |
void |
flushBefore (long pos)
Áö½Ã¹ÞÀº À§Ä¡º¸´Ù ÀüÀÇ ÃʱâÀÇ ½ºÆ®¸² ºÎºÐÀ» ÆÄ±âÇÕ´Ï´Ù. |
boolean |
isCached ()
ÈĹ濡ÀÇ ½ÃÅ©¸¦ °¡´ÉÇÏ°Ô Çϱâ À§Çؼ ÀÌ ImageOutputStream°¡ µ¥ÀÌÅ͸¦ ij½¬Çϱâ À§ÇØ, true°¡ ¸®Åϵ˴ϴÙ
. |
boolean |
isCachedFile ()
ÀÌ ImageOutputStream´Â ÆÄÀÏ Ä³½¬¸¦ À¯ÁöÇϱâ À§ÇØ, true°¡ ¸®Åϵ˴ϴÙ
. |
boolean |
isCachedMemory ()
ÀÌ ImageOutputStream´Â ¸ÞÀÎ ¸Þ¸ð¸® ij½¬¸¦ À¯ÁöÇÏÁö ¾Ê±â ¶§¹®¿¡
false°¡ ¸®Åϵ˴ϴÙ
. |
long |
length ()
½ºÆ®¸²ÀÌ ¹ÌÁöÀÇ ±æÀÌÀÎ °ÍÀ» ³ªÅ¸³½´Ù -1L¸¦ ¸®ÅÏÇÕ´Ï´Ù. |
int |
read ()
½ºÆ®¸²·ÎºÎÅÍ 1 ¹ÙÀÌÆ®¸¦ Àбâ, ±×°ÍÀ» 0 ¿¡¼ 255 ±îÁöÀÇ Á¤¼ö·Î¼ ¸®ÅÏÇÕ´Ï´Ù. |
int |
read (byte[] b,
int off,
int len)
½ºÆ®¸²·ÎºÎÅÍ len ¹ÙÀÌÆ®±îÁö Àбâ, b¿¡ À妽º off·Î
ºÎÅÍ Æ÷ÇÔÇÕ´Ï´Ù. |
void |
seek (long pos)
ÇöÀçÀÇ ½ºÆ®¸² À§Ä¡¸¦ ¼³Á¤ÇØ ºñÆ® ¿ÀÇÁ¼Â(offset)¸¦ 0¿¡ ¸®¼Â ÇÕ´Ï´Ù. |
void |
write (byte[] b,
int off,
int len)
¹è¿ b·Î
ºÎÅÍ len ¹ÙÀÌÆ®¸¦ Â÷·Ê·Î Ãâ·Â ½ºÆ®¸²¿¡ Ãâ·ÂÇÕ´Ï´Ù. |
void |
write (int b)
Àμö b
ÇÏÀ§ 8 ºñÆ®¸¦ Ãâ·Â ½ºÆ®¸²¿¡ Ãâ·ÂÇÕ´Ï´Ù. |
| Ŭ·¡½º javax.imageio.stream. ImageOutputStreamImpl ·ÎºÎÅÍ »ó¼ÓµÈ ¸Þ¼µå |
|---|
flushBits,
write,
writeBit,
writeBits,
writeBoolean,
writeByte,
writeBytes,
writeChar,
writeChars,
writeChars,
writeDouble,
writeDoubles,
writeFloat,
writeFloats,
writeInt,
writeInts,
writeLong,
writeLongs,
writeShort,
writeShorts,
writeUTF |
| Ŭ·¡½º javax.imageio.stream. ImageInputStreamImpl ·ÎºÎÅÍ »ó¼ÓµÈ ¸Þ¼µå |
|---|
checkClosed,
finalize,
flush,
getBitOffset,
getByteOrder,
getFlushedPosition,
getStreamPosition,
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 |
| ÀÎÅÍÆäÀ̽º javax.imageio.stream. ImageInputStream ·ÎºÎÅÍ »ó¼ÓµÈ ¸Þ¼µå |
|---|
flush,
getBitOffset,
getByteOrder,
getFlushedPosition,
getStreamPosition,
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 |
| »ý¼ºÀÚ »ó¼¼ |
|---|
public FileCacheImageOutputStream(OutputStream stream,
File cacheDir)
throws IOException
outputStream¿¡
ÀÇ write¸¦ ½Ç½ÃÇÏ´Â FileCacheImageOutputStream¸¦ ±¸ÃàÇÕ´Ï´Ù.
Àӽà ÆÄÀÏÀÌ Ä³½¬·Î¼ »ç¿ëµË´Ï´Ù. cacheDir°¡ nullÀº ¾Æ´Ï°í, µð·ºÅ丮ÀÎ °æ¿ì, ÆÄÀÏÀÌ °Å±â¿¡ ÀÛ¼ºµË´Ï´Ù. nullÀÎ °æ¿ì, ½Ã½ºÅÛ °íÀ¯ÀÇ µðÆúÆ® Àӽà ÆÄÀÏ µð·ºÅ丮°¡ »ç¿ëµË´Ï´Ù. ÀÚ¼¼ÇÑ °ÍÀº File.createTempFile
¹®¼¸¦ ÂüÁ¶ÇϽʽÿÀ.
stream - Ãâ·ÂóÀÇ OutputStreamcacheDir - 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 void write(int b)
throws IOException
DataOutput
񃬣: b
ÇÏÀ§ 8 ºñÆ®¸¦ Ãâ·Â ½ºÆ®¸²¿¡ Ãâ·ÂÇÕ´Ï´Ù. b
»óÀ§ 24 ºñÆ®¿¡ ´ëÇØ¼´Â ¹«½ÃµË´Ï´Ù.
DataOutput ³»ÀÇ write ImageOutputStream ³»ÀÇ write ImageOutputStreamImpl ³»ÀÇ write b - Ãâ·ÂÇÏ´Â ¹ÙÀÌÆ®
IOException - ÀÔÃâ·Â ¿¡·¯°¡ ¹ß»ýÇßÀ» °æ¿ì
public void write(byte[] b,
int off,
int len)
throws IOException
DataOutput
±â¼ú: b·Î
ºÎÅÍ len ¹ÙÀÌÆ®¸¦ Â÷·Ê·Î Ãâ·Â ½ºÆ®¸²¿¡ Ãâ·ÂÇÕ´Ï´Ù. b°¡ nullÀÎ °æ¿ì´Â NullPointerException°¡ ¹ß»ý µË´Ï´Ù. off°¡ À߸øµÈ °ª
ÀÇ °æ¿ì, len°¡ À߸øµÈ °ª
ÀÇ °æ¿ì, ȤÀº off+len°¡ ¹è¿ b
±æÀ̺¸´Ù Å« °æ¿ì¿¡´Â IndexOutOfBoundsException°¡ ¹ß»ý µË´Ï´Ù. len°¡ Á¦·ÎÀÇ °æ¿ì, Ãâ·ÂÇØÁö´Â ¹ÙÀÌÆ®´Â ¾ø½À´Ï´Ù. ±×·¸Áö ¾ÊÀº °æ¿ì´Â ¿ì¼± ¹ÙÀÌÆ® b[off], ´ÙÀ½¿¡ b[off+1]¿Í
Â÷·ÊÂ÷·Ê Ãâ·ÂÇØÁ® ¸¶Áö¸·¿¡ ¹ÙÀÌÆ® b[off+len-1]°¡ Ãâ·ÂÇØÁý´Ï´Ù.
DataOutput ³»ÀÇ write ImageOutputStream ³»ÀÇ write ImageOutputStreamImpl ³»ÀÇ write b - µ¥ÀÌÅÍoff - µ¥ÀÌÅÍÀÇ °³½Ã ¿ÀÇÁ¼Â(offset)len - Ãâ·ÂÇÏ´Â ¹ÙÀÌÆ®¼ö
IOException - ÀÔÃâ·Â ¿¡·¯°¡ ¹ß»ýÇßÀ» °æ¿ìpublic long length()
ImageInputStreamImpl
±â¼ú: -1L¸¦ ¸®ÅÏÇÕ´Ï´Ù. ¼ºê Ŭ·¡½º¿¡¼ ÀÌ ¸Þ¼µå¸¦ ¿À¹ö¶óÀ̵å(override) ÇØ, ½ÇÁ¦ÀÇ ±æÀÌÀÇ Á¤º¸¸¦ ÁöÁ¤ÇÒ Çʿ䰡 ÀÖ½À´Ï´Ù.
ImageInputStream ³»ÀÇ length ImageInputStreamImpl ³»ÀÇ length
public void seek(long pos)
throws IOException
EOFException´Â ÀÐÀ» °æ¿ì¿¡°Ô¸¸ ¹ß»ý µË´Ï´Ù. Ãâ·ÂÀÌ ½ÇÇàµÉ ¶§±îÁö, ÆÄÀÏÀåÀº Áõ°¡ÇÏÁö ¾Ê½À´Ï´Ù.
ImageInputStream ³»ÀÇ seek ImageInputStreamImpl ³»ÀÇ seek pos - ¸ñÀûÀÇ ÆÄÀÏ Æ÷ÀÎÅÍ À§Ä¡¸¦ ³ªÅ¸³»´Â long
IndexOutOfBoundsException - pos°¡ Ç÷¡½Ã À§Ä¡º¸´Ù ÀÛÀº °æ¿ì
IOException - ±× ¿ÜÀÇ ÀÔÃâ·Â ¿¡·¯°¡ ¹ß»ýÇßÀ» °æ¿ìpublic boolean isCached()
ImageOutputStream°¡ µ¥ÀÌÅ͸¦ ij½¬Çϱâ À§ÇØ, true°¡ ¸®Åϵ˴ϴÙ
.
ImageInputStream ³»ÀÇ isCached ImageInputStreamImpl ³»ÀÇ isCached trueisCachedMemory(),
isCachedFile() public boolean isCachedFile()
ImageOutputStream´Â ÆÄÀÏ Ä³½¬¸¦ À¯ÁöÇϱâ À§ÇØ, true°¡ ¸®Åϵ˴ϴÙ
.
ImageInputStream ³»ÀÇ isCachedFile ImageInputStreamImpl ³»ÀÇ isCachedFile trueisCached(),
isCachedMemory() public boolean isCachedMemory()
ImageOutputStream´Â ¸ÞÀÎ ¸Þ¸ð¸® ij½¬¸¦ À¯ÁöÇÏÁö ¾Ê±â ¶§¹®¿¡
false°¡ ¸®Åϵ˴ϴÙ
.
ImageInputStream ³»ÀÇ isCachedMemory ImageInputStreamImpl ³»ÀÇ isCachedMemory falseisCached(),
isCachedFile()
public void close()
throws IOException
FileCacheImageOututStream¸¦ ´Ý½À´Ï´Ù. º¸·ùÁßÀÇ µ¥ÀÌÅÍ´Â ¸ðµÎ Ãâ·Â¿¡ Ç÷¡½Ã µÇ¾î ij½¬ ÆÄÀÏÀº ´ÝÇôÁ® »èÁ¦µË´Ï´Ù. Ãâ·Âó OutputStream´Â ´ÝÇôÁöÁö ¾Ê½À´Ï´Ù.
ImageInputStream ³»ÀÇ close ImageInputStreamImpl ³»ÀÇ close IOException - ¿¡·¯°¡ ¹ß»ýÇßÀ» °æ¿ì
public void flushBefore(long pos)
throws IOException
ImageInputStream
±â¼ú: IndexOutOfBoundsException°¡ ¹ß»ý µË´Ï´Ù.
flushBefore¸¦ È£ÃâÇϸé, ÀÌ ÀÎÅÍÆäÀ̽º¸¦ ±¸ÇöÇϴ Ŭ·¡½º°¡ ½ºÆ®¸²·ÎºÎÅÍ µ¥ÀÌÅ͸¦ Æ÷ÇÔÇϴµ¥ »ç¿ëÇÏ´Â ¸Þ¸ð¸®³ª µð½ºÅ© ½ºÆäÀ̽ºµîÀÇ ÀÚ¿øÀ» ÇØ¹æÇÒ ¼ö ÀÖ½À´Ï´Ù.
ImageInputStream ³»ÀÇ flushBefore ImageOutputStream ³»ÀÇ flushBefore ImageInputStreamImpl ³»ÀÇ flushBefore pos - Ç÷¡½Ã µÇ´Â ÆÄÀÏ Á¢µÎ»çÀÇ ±æÀ̸¦ ³ªÅ¸³»´Â long
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 µµ ÂüÁ¶ÇϽʽÿÀ.