public final class UnderStoreFileInStream extends BlockInStream
Constructor and Description |
---|
UnderStoreFileInStream(long initPos,
long length,
String ufsPath)
Creates a new under storage file input stream.
|
Modifier and Type | Method and Description |
---|---|
void |
close() |
int |
read() |
int |
read(byte[] b) |
int |
read(byte[] b,
int off,
int len) |
long |
remaining()
Gets the remaining number of bytes left in the stream, starting at the current position.
|
void |
seek(long pos)
Moves the starting read position of the stream to the specified position which is relative to
the start of the stream.
|
long |
skip(long n) |
available, mark, markSupported, reset
public UnderStoreFileInStream(long initPos, long length, String ufsPath) throws IOException
initPos
- the initial positionlength
- the lengthufsPath
- the under file system pathIOException
- if an I/O error occurspublic void close() throws IOException
close
in interface Closeable
close
in interface AutoCloseable
close
in class InputStream
IOException
public int read() throws IOException
read
in class InputStream
IOException
public int read(byte[] b) throws IOException
read
in class InputStream
IOException
public int read(byte[] b, int off, int len) throws IOException
read
in class InputStream
IOException
public long remaining()
BoundedStream
public void seek(long pos) throws IOException
Seekable
pos
- The position to seek to, it must be between 0 and the end of the stream - 1.IOException
- if the seek fails due to an error accessing the stream at the positionpublic long skip(long n) throws IOException
skip
in class InputStream
IOException
Copyright © 2015. All Rights Reserved.