public class FileVersionOutputStream extends OutputStream
| Modifier and Type | Field and Description |
|---|---|
protected String |
id |
protected BigdataFileSystem |
repo |
protected int |
version |
| Constructor and Description |
|---|
FileVersionOutputStream(BigdataFileSystem repo,
String id,
int version)
Create an output stream that will atomically append blocks of data to
the specified file version.
|
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Flushes the buffer.
|
long |
copyStream(InputStream is)
Consumes the input stream, writing blocks onto the file version.
|
void |
flush()
If there is data data accumulated in the buffer then it is written on
the file version using an atomic append (empty buffers are NOT
flushed).
|
long |
getBlockCount()
#of blocks written onto the file version.
|
long |
getByteCount()
#of bytes written onto this output stream.
|
String |
getId()
The file identifier.
|
int |
getVersion()
The file version identifer.
|
void |
write(int b)
Buffers the byte.
|
write, writeprotected final BigdataFileSystem repo
protected final String id
protected final int version
public FileVersionOutputStream(BigdataFileSystem repo, String id, int version)
id - The file identifier.version - The version identifier.public String getId()
public int getVersion()
public long getByteCount()
public long getBlockCount()
public void write(int b)
throws IOException
write in class OutputStreamIOExceptionpublic void flush()
throws IOException
flush in interface Flushableflush in class OutputStreamIOExceptionpublic void close()
throws IOException
close in interface Closeableclose in interface AutoCloseableclose in class OutputStreamIOExceptionpublic long copyStream(InputStream is) throws IOException
is - The input stream (closed iff it is fully consumed).IOExceptionCopyright © 2006–2019 SYSTAP, LLC DBA Blazegraph. All rights reserved.