public class BlobInputStream
extends java.io.InputStream
Constructor and Description |
---|
BlobInputStream(BlockStore store,
byte[] inode,
int inodeOffset)
Creates a blob output stream.
|
BlobInputStream(Inode inode)
Creates a blob output stream.
|
Modifier and Type | Method and Description |
---|---|
void |
close()
Closes the buffer.
|
void |
init(BlockStore store,
byte[] inode,
int inodeOffset)
Initialize the output stream.
|
int |
read()
Reads a byte.
|
int |
read(byte[] buf,
int offset,
int length)
Reads a buffer.
|
static long |
readLong(byte[] buffer,
int offset)
Writes the long.
|
int |
readToOutput(java.io.OutputStream os) |
public BlobInputStream(BlockStore store, byte[] inode, int inodeOffset)
store
- the output storepublic BlobInputStream(Inode inode)
store
- the output storepublic void init(BlockStore store, byte[] inode, int inodeOffset)
public int read() throws java.io.IOException
read
in class java.io.InputStream
java.io.IOException
public int read(byte[] buf, int offset, int length) throws java.io.IOException
read
in class java.io.InputStream
java.io.IOException
public int readToOutput(java.io.OutputStream os) throws java.io.IOException
java.io.IOException
public void close()
close
in interface java.io.Closeable
close
in interface java.lang.AutoCloseable
close
in class java.io.InputStream
public static long readLong(byte[] buffer, int offset)