|
JavaTM Platform Standard Ed. 6 |
|||||||||
| 앞의 클래스 다음의 클래스 | 프레임 있어 프레임 없음 | |||||||||
| 개요: 상자 | 필드 | 생성자 | 메소드 | 상세: 필드 | 생성자 | 메소드 | |||||||||
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 ()
스트림을 닫습니다. |
protected void |
finalize ()
가베지 컬렉션의 전에 이 객체를 finalize 합니다. |
long |
length ()
기본이 되는 파일의 길이, 또는 그것이 불명한 경우는 -1 을 돌려줍니다. |
int |
read ()
스트림로부터 1 바이트를 읽어들여, 그것을 0 에서 255 까지의 int 로서 돌려줍니다. |
int |
read (byte[] b,
int off,
int len)
스트림로부터 len 바이트까지 읽어들여,b 에 인덱스 off 로부터 포함합니다. |
void |
seek (long pos)
현재의 스트림 위치를 목적의 위치로 설정합니다. |
| 클래스 javax.imageio.stream. ImageInputStreamImpl 로부터 상속된 메소드 |
|---|
checkClosed , 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
ImageInputStreamImpl 의 기술:int 로서 돌려줍니다. EOF 에 이르면(자) -1 를 돌려줍니다.
서브 클래스에서 이 메소드를 구현할 필요가 있습니다. 서브 클래스 구현으로 종료하기 전에 스트림 위치를 갱신합니다.
스트림내의 비트 오프셋(offset)는, read를 실시하기 전에 0 에 리셋 할 필요가 있습니다.
ImageInputStream 내의 read ImageInputStreamImpl 내의 read -1
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
-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 - 입출력 에러가 발생했을 경우
protected void finalize()
throws Throwable
close 메소드를 호출해, 열려 있는 입력 소스를 모두 닫습니다. 이 메소드를, 어플리케이션 코드로부터 호출해서는 안됩니다.
ImageInputStreamImpl 내의 finalize Throwable - 슈퍼 클래스의 finalize시에 에러가 발생했을 경우
|
JavaTM Platform Standard Ed. 6 |
|||||||||
| 앞의 클래스 다음의 클래스 | 프레임 있어 프레임 없음 | |||||||||
| 개요: 상자 | 필드 | 생성자 | 메소드 | 상세: 필드 | 생성자 | 메소드 | |||||||||
Copyright 2006 Sun Microsystems, Inc. All rights reserved. Use is subject to license terms . Documentation Redistribution Policy 도 참조해 주세요.