@NotThreadSafe public final class CephInputStream extends InputStream
Constructor and Description |
---|
CephInputStream(com.ceph.fs.CephMount mount,
int fh,
long flength)
Create a new CephInputStream.
|
Modifier and Type | Method and Description |
---|---|
int |
available() |
void |
close() |
long |
getPos()
Gets the current position of the stream.
|
int |
read() |
int |
read(byte[] buf,
int off,
int len) |
void |
seek(long targetPos)
Seek.
|
long |
skip(long n) |
mark, markSupported, read, reset
public CephInputStream(com.ceph.fs.CephMount mount, int fh, long flength)
mount
- CephFileSystem mountfh
- The filehandle provided by Ceph to referenceflength
- The current length of the file. If the length changes
you will need to close and re-open it to access the new datapublic long getPos() throws IOException
IOException
public int available() throws IOException
available
in class InputStream
IOException
public void seek(long targetPos) throws IOException
targetPos
- PositionIOException
- throwspublic long skip(long n) throws IOException
skip
in class InputStream
IOException
public int read() throws IOException
read
in class InputStream
IOException
public int read(byte[] buf, int off, int len) throws IOException
read
in class InputStream
IOException
public void close() throws IOException
close
in interface Closeable
close
in interface AutoCloseable
close
in class InputStream
IOException
Copyright © 2023. All Rights Reserved.