public class OSSInputStream extends SeekableInputStream
Constructor and Description |
---|
OSSInputStream(com.aliyun.oss.OSS client,
OSSURI uri) |
Modifier and Type | Method and Description |
---|---|
void |
close() |
protected void |
finalize() |
long |
getPos()
Return the current position in the InputStream.
|
int |
read() |
int |
read(byte[] b,
int off,
int len) |
void |
seek(long newPos)
Seek to a new position in the InputStream.
|
public OSSInputStream(com.aliyun.oss.OSS client, OSSURI uri)
public long getPos()
SeekableInputStream
getPos
in class SeekableInputStream
public void seek(long newPos)
SeekableInputStream
seek
in class SeekableInputStream
newPos
- the new position to seek topublic int read() throws java.io.IOException
read
in class java.io.InputStream
java.io.IOException
public int read(byte[] b, int off, int len) throws java.io.IOException
read
in class java.io.InputStream
java.io.IOException
public void close() throws java.io.IOException
close
in interface java.io.Closeable
close
in interface java.lang.AutoCloseable
close
in class java.io.InputStream
java.io.IOException
protected void finalize() throws java.lang.Throwable
finalize
in class java.lang.Object
java.lang.Throwable