GeezerVison is showing docs.oracle.com — FileImageInputStream (Java Platform SE 8 )
Java™ Platform Standard Ed. 8
javax.imageio.stream
Class FileImageInputStream
-
-
Method Summary
All Methods Instance Methods Concrete Methods
| Modifier and Type |
Method |
Description |
void |
close() |
Closes the stream.
|
protected void |
finalize() |
Finalizes this object prior to garbage collection.
|
long |
length() |
Returns the length of the underlying file, or -1
if it is unknown.
|
int |
read() |
Reads a single byte from the stream and returns it as an
int between 0 and 255.
|
int |
read(byte[] b,
int off,
int len) |
Reads up to len bytes from the stream, and stores
them into b starting at index off.
|
void |
seek(long pos) |
Sets the current stream position to the desired location.
|
-
Methods inherited from class 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
-
-
Method Detail
-
close
public void close()
throws IOException
Closes the stream. Attempts to access a stream that has been
closed may result in IOExceptions or incorrect
behavior. Calling this method may allow classes implementing
this interface to release resources associated with the stream
such as memory, disk space, or file descriptors.
- Specified by:
close in interface Closeable
- Specified by:
close in interface AutoCloseable
- Specified by:
close in interface ImageInputStream
- Overrides:
close in class ImageInputStreamImpl
- Throws:
IOException - if an I/O error occurs.
-
finalize
protected void finalize()
throws Throwable
Finalizes this object prior to garbage collection. The
close method is called to close any open input
source. This method should not be called from application
code.
- Overrides:
finalize in class ImageInputStreamImpl
- Throws:
Throwable - if an error occurs during superclass
finalization.
- See Also:
WeakReference,
PhantomReference
Java™ Platform Standard Ed. 8
Submit a bug or feature For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples. Copyright © 1993, 2026, Oracle and/or its affiliates. All rights reserved. Use is subject to license terms. Also see the documentation redistribution policy.
|