|
JavaTM 2 Platform Standard Ed. 5.0 |
|||||||||
ÀÌÀü Ŭ·¡½º ´ÙÀ½ Ŭ·¡½º | ÇÁ·¹ÀÓÀ¸·Î ÇÁ·¹ÀÓ ¾øÀÌ | |||||||||
°³¿ä: NESTED | Çʵå | constructor | ¸Þ¼µå | »ó¼¼: Çʵå | »ý¼ºÀÚ | ¸Þ¼µå |
java.lang.Objectjavax.imageio.stream.ImageInputStreamImpl
javax.imageio.stream.ImageOutputStreamImpl
javax.imageio.stream.FileImageOutputStream
public class FileImageOutputStream
Ãâ·ÂÀ» File
¶Ç´Â RandomAccessFile
¿¡ Á÷Á¢ Ãâ·ÂÇÏ´Â ImageOutputStream
±¸ÇöÀÔ´Ï´Ù.
ÇÊµå °³¿ä |
---|
Ŭ·¡½º javax.imageio.stream. ImageInputStreamImpl ·ÎºÎÅÍ »ó¼ÓµÈ Çʵå |
---|
bitOffset,
byteOrder,
flushedPos,
streamPos |
»ý¼ºÀÚ °³¿ä | |
---|---|
FileImageOutputStream (File f)
ÁöÁ¤µÈ File ¿¡ Ãâ·ÂÇÏ´Â FileImageOutputStream ¸¦ ±¸ÃàÇÕ´Ï´Ù. |
|
FileImageOutputStream (RandomAccessFile raf)
ÁöÁ¤µÈ RandomAccessFile ¿¡ Ãâ·ÂÇÏ´Â FileImageOutputStream ¸¦ ±¸ÃàÇÕ´Ï´Ù. |
¸Þ¼µå °³¿ä | |
---|---|
void |
close ()
½ºÆ®¸²À» ´Ý½À´Ï´Ù. |
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,
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 |
ÀÎÅÍÆäÀ̽º javax.imageio.stream. ImageOutputStream ·ÎºÎÅÍ »ó¼ÓµÈ ¸Þ¼µå |
---|
flushBefore |
ÀÎÅÍÆäÀ̽º javax.imageio.stream. ImageInputStream ·ÎºÎÅÍ »ó¼ÓµÈ ¸Þ¼µå |
---|
flush,
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 |
»ý¼ºÀÚ »ó¼¼ |
---|
public FileImageOutputStream(File f) throws FileNotFoundException, IOException
File
¿¡ Ãâ·ÂÇÏ´Â FileImageOutputStream
¸¦ ±¸ÃàÇÕ´Ï´Ù.
f
- Ãâ·ÂóÀÇ File
IllegalArgumentException
- f
°¡ null
ÀÎ °æ¿ì
SecurityException
- ½ÃÅ¥·¯Æ¼ ¸Å´ÏÀú°¡ Á¸ÀçÇØ, ÆÄÀÏ¿¡ÀÇ ¾²±â ±ÇÇѰ¡ Çã°¡µÇÁö ¾Ê´Â °æ¿ì
FileNotFoundException
- f
°¡ º¸Åë ÆÄÀÏÀ» ³ªÅ¸³»Áö ¾ÊÀºÁö, ´Ù¸¥ ¾î¶°ÇÑ ÀÌÀ¯·Î½á read ¹× Ãâ·ÂÇØ¿ëÀ¸·Î ¿ ¼ö°¡ ¾ø´Â °æ¿ì
IOException
- ÀÔÃâ·Â ¿¡·¯°¡ ¹ß»ýÇßÀ» °æ¿ìpublic FileImageOutputStream(RandomAccessFile raf)
RandomAccessFile
¿¡ Ãâ·ÂÇÏ´Â FileImageOutputStream
¸¦ ±¸ÃàÇÕ´Ï´Ù.
raf
- Ãâ·ÂóÀÇ 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 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 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 µµ ÂüÁ¶ÇϽʽÿÀ.