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, write
protected 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 OutputStream
IOException
public void flush() throws IOException
flush
in interface Flushable
flush
in class OutputStream
IOException
public void close() throws IOException
close
in interface Closeable
close
in interface AutoCloseable
close
in class OutputStream
IOException
public long copyStream(InputStream is) throws IOException
is
- The input stream (closed iff it is fully consumed).IOException
Copyright © 2006–2019 SYSTAP, LLC DBA Blazegraph. All rights reserved.