@NotThreadSafe
public final class CephInputStream
extends java.io.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) |
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 java.io.IOException
java.io.IOExceptionpublic int available()
throws java.io.IOException
available in class java.io.InputStreamjava.io.IOExceptionpublic void seek(long targetPos)
throws java.io.IOException
targetPos - Positionjava.io.IOException - throwspublic long skip(long n)
throws java.io.IOException
skip in class java.io.InputStreamjava.io.IOExceptionpublic int read()
throws java.io.IOException
read in class java.io.InputStreamjava.io.IOExceptionpublic int read(byte[] buf,
int off,
int len)
throws java.io.IOException
read in class java.io.InputStreamjava.io.IOExceptionpublic void close()
throws java.io.IOException
close in interface java.io.Closeableclose in interface java.lang.AutoCloseableclose in class java.io.InputStreamjava.io.IOExceptionCopyright © 2024. All Rights Reserved.