public class FileOutput
extends java.lang.Object
implements java.nio.channels.WritableByteChannel
WritableByteChannel for a durable collection file, which will construct a hash as the file is
written, and add the appropriate prefix.| Modifier and Type | Field and Description |
|---|---|
static java.nio.ByteBuffer |
MAGIC_BYTES |
| Constructor and Description |
|---|
FileOutput(ISet<IDurableCollection.Fingerprint> dependencies) |
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
boolean |
isOpen() |
java.nio.file.Path |
moveTo(java.nio.file.Path directory)
Finalizes the collection after
close() is called, moving the file to directory, with the hex-encoded
hash for a name. |
long |
transferFrom(BufferedChannel channel,
long start,
long end) |
int |
write(java.nio.ByteBuffer src) |
public FileOutput(ISet<IDurableCollection.Fingerprint> dependencies)
public java.nio.file.Path moveTo(java.nio.file.Path directory)
close() is called, moving the file to directory, with the hex-encoded
hash for a name.public long transferFrom(BufferedChannel channel, long start, long end)
public int write(java.nio.ByteBuffer src)
throws java.io.IOException
write in interface java.nio.channels.WritableByteChanneljava.io.IOExceptionpublic boolean isOpen()
isOpen in interface java.nio.channels.Channelpublic void close()
close in interface java.io.Closeableclose in interface java.lang.AutoCloseableclose in interface java.nio.channels.Channel