org.geotoolkit.image.io.stream
Class FileImageInputStream
Object
ImageInputStreamImpl
FileChannelImageInputStream
FileImageInputStream
- All Implemented Interfaces:
- DataInput, ImageInputStream
public class FileImageInputStream
- extends FileChannelImageInputStream
An Image Input Stream using a File Channel
as the data source. This implementation differs from the Sun's parent implementation in three
ways:
- The constructor expects a
File argument instead than a FileChannel
argument, so no reference to the channel exists outside this class.
- The
close() method closes also the channel. This is allowed because
this class "own" the channel.
- The file given to the constructor is keep for information purpose.
- Since:
- 3.01
- Version:
- 3.01
- Author:
- Martin Desruisseaux (Geomatys)
- See Also:
FileImageInputStream
- Module:
|
Field Summary |
File |
file
The file given to the constructor. |
|
Method Summary |
void |
close()
Closes this stream and its underlying channel. |
| Methods inherited from class FileChannelImageInputStream |
length, read, read, readFully, readFully, readFully, readFully, readFully, readFully, seek, setByteOrder |
| Methods inherited from class ImageInputStreamImpl |
checkClosed, finalize, flush, flushBefore, getBitOffset, getByteOrder, getFlushedPosition, getStreamPosition, isCached, isCachedFile, isCachedMemory, mark, read, readBit, readBits, readBoolean, readByte, readBytes, readChar, readDouble, readFloat, readFully, readFully, readInt, readLine, readLong, readShort, readUnsignedByte, readUnsignedInt, readUnsignedShort, readUTF, reset, setBitOffset, skipBytes, skipBytes |
file
public final File file
- The file given to the constructor.
FileImageInputStream
public FileImageInputStream(File file)
throws IOException
- Creates a new image input stream for the given file.
- Parameters:
file - The file for which to create an image input stream.
- Throws:
IOException - If an error occurred while opening the channel.
close
public void close()
throws IOException
- Closes this stream and its underlying channel.
- Specified by:
close in interface ImageInputStream- Overrides:
close in class FileChannelImageInputStream
- Throws:
IOException - If an error occurred while closing the stream.
Copyright © 2009-2013 Geotoolkit.org. All Rights Reserved.