public class FileBuffer extends AbstractBuffer
Modifier and Type | Method and Description |
---|---|
void |
close()
Closes the buffer, cleaning up file state.
|
void |
flush(boolean includeMetadata)
Flush the buffer, writing any pending content to the underlying storage device,
optionally also the file's metadata.
|
int |
read(ByteBuffer dst)
Delegates to
FileChannel |
int |
read(ByteBuffer dst,
long position)
Delegates to
FileChannel |
long |
size() |
void |
truncate(long size) |
int |
write(ByteBuffer src)
Delegates to
FileChannel |
int |
write(ByteBuffer src,
long position)
Delegates to
FileChannel |
getPath, toString
public void close() throws IOException
IOException
- if an I/O error occurs.public void flush(boolean includeMetadata) throws IOException
includeMetadata
- flushes also the file metadata, not just the contentIOException
- an I/O error that occurredpublic int read(ByteBuffer dst) throws IOException
FileChannel
IOException
FileChannel
public int read(ByteBuffer dst, long position) throws IOException
FileChannel
IOException
FileChannel
public int write(ByteBuffer src, long position) throws IOException
FileChannel
IOException
FileChannel
public int write(ByteBuffer src) throws IOException
FileChannel
IOException
FileChannel
public long size() throws IOException
IOException
public void truncate(long size) throws IOException
IOException
Version: 4.4.12-ice34-b116
Copyright © 2014 The University of Dundee & Open Microscopy Environment. All Rights Reserved.