? RandomAccessFileInputStream
java.lang.Object
java.io.InputStream
org.apache.commons.io.input.RandomAccessFileInputStream
- ????????:
Closeable
,AutoCloseable
Streams data from a
RandomAccessFile
starting at its current position.- ???????:
- 2.8.0
-
?????
????????Constructs a new instance configured to leave the underlying file open when this stream is closed.RandomAccessFileInputStream
(RandomAccessFile file, boolean closeOnClose) Constructs a new instance. -
????
??????????int
Returns an estimate of the number of bytes that can be read (or skipped over) from this input stream.long
Returns the number of bytes that can be read (or skipped over) from this input stream.void
close()
Gets the underlying file.boolean
Returns whether to close the underlying file when this stream is closed.int
read()
int
read
(byte[] bytes) int
read
(byte[] bytes, int offset, int length) long
skip
(long skipCount) ??????? java.io.InputStream
mark, markSupported, nullInputStream, readAllBytes, readNBytes, readNBytes, reset, skipNBytes, transferTo
-
???????
-
RandomAccessFileInputStream
Constructs a new instance configured to leave the underlying file open when this stream is closed.- ??:
file
- The file to stream.
-
RandomAccessFileInputStream
Constructs a new instance.- ??:
file
- The file to stream.closeOnClose
- Whether to close the underlying file when this stream is closed.
-
-
??????
-
available
Returns an estimate of the number of bytes that can be read (or skipped over) from this input stream. If there are more thanInteger.MAX_VALUE
bytes available, returnInteger.MAX_VALUE
.- ??:
available
???InputStream
- ??:
- An estimate of the number of bytes that can be read.
- ??:
IOException
- If an I/O error occurs.
-
availableLong
Returns the number of bytes that can be read (or skipped over) from this input stream.- ??:
- The number of bytes that can be read.
- ??:
IOException
- If an I/O error occurs.
-
close
- ???:
close
????AutoCloseable
- ???:
close
????Closeable
- ??:
close
???InputStream
- ??:
IOException
-
getRandomAccessFile
Gets the underlying file.- ??:
- the underlying file.
-
isCloseOnClose
Returns whether to close the underlying file when this stream is closed.- ??:
- Whether to close the underlying file when this stream is closed.
-
read
- ???:
read
???InputStream
- ??:
IOException
-
read
- ??:
read
???InputStream
- ??:
IOException
-
read
- ??:
read
???InputStream
- ??:
IOException
-
skip
- ??:
skip
???InputStream
- ??:
IOException
-