public class RandomCompressedInputStream
extends java.io.InputStream
RandomCompressedOutputStream. The underlying stream should be
seekable and the total size of it should be known because the lookup table
that helps doing the random access is stored at the very end.| Constructor and Description |
|---|
RandomCompressedInputStream(FileSystem fs,
Path p) |
RandomCompressedInputStream(FSDataInputStream in,
long totalLength) |
| Modifier and Type | Method and Description |
|---|---|
int |
available() |
void |
close() |
long |
getPos() |
int |
read() |
int |
read(long position,
byte[] buffer,
int offset,
int length) |
void |
readFully(long position,
byte[] buffer) |
void |
readFully(long position,
byte[] buffer,
int offset,
int length) |
void |
seek(long newPos) |
boolean |
seekToNewSource(long newPos) |
long |
skip(long n) |
public RandomCompressedInputStream(FileSystem fs,
Path p)
throws java.io.IOException
java.io.IOExceptionpublic RandomCompressedInputStream(FSDataInputStream in,
long totalLength)
throws java.io.IOException
java.io.IOExceptionpublic long getPos()
throws java.io.IOException
java.io.IOExceptionpublic void seek(long newPos)
throws java.io.IOException
java.io.IOExceptionpublic boolean seekToNewSource(long newPos)
throws java.io.IOException
java.io.IOExceptionpublic int read()
throws java.io.IOException
read in class java.io.InputStreamjava.io.IOExceptionpublic long skip(long n)
throws java.io.IOException
skip 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.IOExceptionpublic int read(long position,
byte[] buffer,
int offset,
int length)
throws java.io.IOException
java.io.IOExceptionpublic void readFully(long position,
byte[] buffer,
int offset,
int length)
throws java.io.IOException
java.io.IOExceptionpublic void readFully(long position,
byte[] buffer)
throws java.io.IOException
java.io.IOExceptionpublic int available()
throws java.io.IOException
available in class java.io.InputStreamjava.io.IOException