|
JavaTM 2 Platform Standard Ed. 5.0 |
|||||||||
| ÀÌÀü Ŭ·¡½º ´ÙÀ½ÀÇ Å¬·¡½º | ÇÁ·¹ÀÓÀ¸·Î ÇÁ·¹ÀÓ ¾øÀÌ | |||||||||
| °³¿ä: NESTED | Çʵå | constructor | ¸Þ¼µå | »ó¼¼: Çʵå | »ý¼ºÀÚ | ¸Þ¼µå | |||||||||
java.lang.Objectjavax.imageio.stream.ImageInputStreamImpl
javax.imageio.stream.ImageOutputStreamImpl
javax.imageio.stream.MemoryCacheImageOutputStream
public class MemoryCacheImageOutputStream
Ãâ·ÂÀ» º¸Åë
ÀÇ OutputStream¿¡ Ãâ·ÂÇÏ´Â ImageOutputStream
±¸ÇöÀÔ´Ï´Ù. ¸Þ¸ð¸®¹åÆÄ¿¡´Â Àû¾îµµ ÆÄ±â À§Ä¡¿Í ÇöÀçÀÇ Ãâ·Â À§Ä¡¿ÍÀÇ »çÀÌÀÇ µ¥ÀÌÅͰ¡ ij½¬µË´Ï´Ù. OutputStream¸¦ »ç¿ëÇÏ´Â °ÍÀº »ý¼ºÀÚ
¸¸À̹ǷΠÀÌ Å¬·¡½º´Â Àбâ, º¯°æ, ¶Ç´Â Ãâ·ÂÁ¶ÀÛ¿¡ »ç¿ëÇÒ ¼ö ¾ø´Â °æ¿ì°¡ ÀÖ½À´Ï´Ù. read´Â ij½¬¿¡ Ãâ·ÂÀÌ ³¡³ »óÅ·Π¾ÆÁ÷ Ç÷¡½ÃµÇ¾î ÀÖÁö ¾ÊÀº ½ºÆ®¸² ºÎºÐ¿¡ ´ëÇÑ º¸°í ½Ç½ÃÇÒ ¼ö ÀÖ½À´Ï´Ù
.
| ÇÊµå °³¿ä |
|---|
| Ŭ·¡½º javax.imageio.stream. ImageInputStreamImpl ·ÎºÎÅÍ »ó¼ÓµÈ Çʵå |
|---|
bitOffset,
byteOrder,
flushedPos,
streamPos |
| »ý¼ºÀÚ °³¿ä | |
|---|---|
MemoryCacheImageOutputStream (OutputStream stream)
ÁöÁ¤µÈ outputStream¿¡ Ãâ·ÂÇÏ´Â MemoryCacheImageOutputStream¸¦ ±¸ÃàÇÕ´Ï´Ù. |
|
| ¸Þ¼µå °³¿ä | |
|---|---|
void |
close ()
ÀÌ MemoryCacheImageOutputStream¸¦ ´Ý½À´Ï´Ù. |
void |
flushBefore (long pos)
Áö½Ã¹ÞÀº À§Ä¡º¸´Ù ÀüÀÇ ÃʱâÀÇ ½ºÆ®¸² ºÎºÐÀ» ÆÄ±âÇÕ´Ï´Ù. |
boolean |
isCached ()
ÈĹ濡ÀÇ ½ÃÅ©¸¦ °¡´ÉÇÏ°Ô Çϱâ À§Çؼ ÀÌ ImageOutputStream°¡ µ¥ÀÌÅ͸¦ ij½¬Çϱâ À§ÇØ, true°¡ ¸®Åϵ˴ϴÙ
. |
boolean |
isCachedFile ()
ÀÌ mageOutputStream´Â ÆÄÀÏ Ä³½¬¸¦ À¯ÁöÇÏÁö ¾Ê±â ¶§¹®¿¡
false°¡ ¸®Åϵ˴ϴÙ
. |
boolean |
isCachedMemory ()
ÀÌ ImageOutputStream´Â ¸ÞÀÎ ¸Þ¸ð¸® ij½¬¸¦ À¯ÁöÇϱâ À§ÇØ, true°¡ ¸®Åϵ˴ϴÙ
. |
long |
length ()
½ºÆ®¸²ÀÌ ¹ÌÁöÀÇ ±æÀÌÀÎ °ÍÀ» ³ªÅ¸³½´Ù -1L¸¦ ¸®ÅÏÇÕ´Ï´Ù. |
int |
read ()
½ºÆ®¸²·ÎºÎÅÍ 1 ¹ÙÀÌÆ®¸¦ Àбâ, ±×°ÍÀ» 0 ¿¡¼ 255 ±îÁöÀÇ Á¤¼ö·Î¼ ¸®ÅÏÇÕ´Ï´Ù. |
int |
read (byte[] b,
int off,
int len)
½ºÆ®¸²·ÎºÎÅÍ len ¹ÙÀÌÆ®±îÁö Àбâ, b¿¡ À妽º off·Î
ºÎÅÍ Æ÷ÇÔÇÕ´Ï´Ù. |
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,
seek,
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,
seek,
setBitOffset,
setByteOrder,
skipBytes,
skipBytes |
| »ý¼ºÀÚ »ó¼¼ |
|---|
public MemoryCacheImageOutputStream(OutputStream stream)
outputStream¿¡ Ãâ·ÂÇÏ´Â MemoryCacheImageOutputStream¸¦ ±¸ÃàÇÕ´Ï´Ù.
stream - Ãâ·ÂóÀÇ OutputStream
IllegalArgumentException - stream°¡ 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 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 boolean isCached()
ImageOutputStream°¡ µ¥ÀÌÅ͸¦ ij½¬Çϱâ À§ÇØ, true°¡ ¸®Åϵ˴ϴÙ
.
ImageInputStream ³»ÀÇ isCached ImageInputStreamImpl ³»ÀÇ isCached trueisCachedMemory(),
isCachedFile() public boolean isCachedFile()
mageOutputStream´Â ÆÄÀÏ Ä³½¬¸¦ À¯ÁöÇÏÁö ¾Ê±â ¶§¹®¿¡
false°¡ ¸®Åϵ˴ϴÙ
.
ImageInputStream ³»ÀÇ isCachedFile ImageInputStreamImpl ³»ÀÇ isCachedFile falseisCached(),
isCachedMemory() public boolean isCachedMemory()
ImageOutputStream´Â ¸ÞÀÎ ¸Þ¸ð¸® ij½¬¸¦ À¯ÁöÇϱâ À§ÇØ, true°¡ ¸®Åϵ˴ϴÙ
.
ImageInputStream ³»ÀÇ isCachedMemory ImageInputStreamImpl ³»ÀÇ isCachedMemory trueisCached(),
isCachedFile()
public void close()
throws IOException
MemoryCacheImageOutputStream¸¦ ´Ý½À´Ï´Ù. º¸·ùÁßÀÇ µ¥ÀÌÅÍ´Â ¸ðµÎ Ãâ·Â¿¡ Ç÷¡½Ã µÇ¾î 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 µµ ÂüÁ¶ÇϽʽÿÀ.