java.lang.Object | ||||
↳ | java.io.InputStream | |||
↳ | java.io.FileInputStream | |||
↳ | android.os.ParcelFileDescriptor.AutoCloseInputStream | |||
↳ | android.content.res.AssetFileDescriptor.AutoCloseInputStream |
An InputStream you can create on a ParcelFileDescriptor, which will take care of calling ParcelFileDescritor.close() for you when the stream is closed.
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Returns the number of bytes that are available before this stream will
block.
| |||||||||||
Sets a mark position in this InputStream.
| |||||||||||
Indicates whether this stream supports the
mark() and
reset() methods. | |||||||||||
Reads at most
count bytes from this stream and stores them in the
byte array buffer starting at offset . | |||||||||||
Reads bytes from this stream and stores them in the byte array
buffer . | |||||||||||
Reads a single byte from this stream and returns it as an integer in the
range from 0 to 255.
| |||||||||||
Resets this stream to the last marked location.
| |||||||||||
Skips
count number of bytes in this stream. |
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class android.os.ParcelFileDescriptor.AutoCloseInputStream
| |||||||||||
From class java.io.FileInputStream
| |||||||||||
From class java.io.InputStream
| |||||||||||
From class java.lang.Object
| |||||||||||
From interface java.io.Closeable
|
IOException |
---|
Returns the number of bytes that are available before this stream will block. This method always returns the size of the file minus the current position.
IOException |
---|
Sets a mark position in this InputStream. The parameter readlimit
indicates how many bytes can be read before the mark is invalidated.
Sending reset()
will reposition the stream back to the marked
position provided readLimit
has not been surpassed.
This default implementation does nothing and concrete subclasses must provide their own implementation.
readlimit | the number of bytes that can be read from this stream before the mark is invalidated. |
---|
Indicates whether this stream supports the mark()
and
reset()
methods. The default implementation returns false
.
false
.Reads at most count
bytes from this stream and stores them in the
byte array buffer
starting at offset
.
buffer | the byte array in which to store the bytes read. |
---|---|
offset | the initial position in buffer to store the bytes read
from this stream. |
count | the maximum number of bytes to store in buffer . |
IOException |
---|
Reads bytes from this stream and stores them in the byte array
buffer
.
buffer | the byte array in which to store the bytes read. |
---|
IOException |
---|
Reads a single byte from this stream and returns it as an integer in the range from 0 to 255. Returns -1 if the end of this stream has been reached.
IOException |
---|
Resets this stream to the last marked location. Throws an
IOException
if the number of bytes read since the mark has been
set is greater than the limit provided to mark
, or if no mark
has been set.
This implementation always throws an IOException
and concrete
subclasses should provide the proper implementation.
IOException |
---|
Skips count
number of bytes in this stream. Subsequent
read()
's will not return these bytes unless reset()
is
used. This method may perform multiple reads to read count
bytes.
count | the number of bytes to skip. |
---|
IOException |
---|