public final class LocalBlockOutStream extends BufferedBlockOutStream
mBlockId, mBlockSize, mBuffer, mClosed, mContext, mFlushedBytes, mWrittenBytes
Constructor and Description |
---|
LocalBlockOutStream(long blockId,
long blockSize)
Creates a new local block output stream.
|
Modifier and Type | Method and Description |
---|---|
void |
cancel()
Cancels the write to Tachyon storage.
|
void |
close() |
void |
flush() |
protected void |
unBufferedWrite(byte[] b,
int off,
int len)
Writes the data in the byte array directly to the backing store.
|
checkIfClosed, remaining, write, write, write
public LocalBlockOutStream(long blockId, long blockSize) throws IOException
blockId
- the block idblockSize
- the block sizeIOException
- if an I/O error occurspublic void cancel() throws IOException
Cancelable
IOException
- if there is a failure when the worker invalidates the cache attemptpublic void close() throws IOException
close
in interface Closeable
close
in interface AutoCloseable
close
in class OutputStream
IOException
public void flush() throws IOException
flush
in interface Flushable
flush
in class OutputStream
IOException
protected void unBufferedWrite(byte[] b, int off, int len) throws IOException
BufferedBlockOutStream
unBufferedWrite
in class BufferedBlockOutStream
b
- the data that should be writtenoff
- the offset into the data to start writing fromlen
- the length to writeIOException
- if the write does not succeedCopyright © 2015. All Rights Reserved.