public class BinaryDataFileSync extends Object implements BinaryDataFile
| Constructor and Description |
|---|
BinaryDataFileSync(BinaryDataFile other) |
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
boolean |
isOpen()
Is it open?
|
long |
length()
Return the length of the file (including any buffered writes)
|
void |
open()
Open the file
|
int |
read(long posn,
byte[] b)
Read into a byte array, returning the number of bytes read.
|
int |
read(long posn,
byte[] b,
int start,
int length)
Read into a byte array, returning the number of bytes read.
|
void |
sync() |
void |
truncate(long length)
Truncate the file
|
long |
write(byte[] b)
Write bytes - bytes are always written to the end of the file.
|
long |
write(byte[] b,
int start,
int length)
Write bytes - bytes are always written to the end of the file.
|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitisEmptypublic BinaryDataFileSync(BinaryDataFile other)
public void open()
BinaryDataFileopen in interface BinaryDataFilepublic boolean isOpen()
BinaryDataFileisOpen in interface BinaryDataFilepublic int read(long posn,
byte[] b)
BinaryDataFileread in interface BinaryDataFileposn - Location of the read operation.b - byte arraypublic int read(long posn,
byte[] b,
int start,
int length)
BinaryDataFileread in interface BinaryDataFileposn - Location of the read operation.start - of bytesarray to read intolength - Maximum number of bytes to read.public long write(byte[] b)
BinaryDataFilewrite in interface BinaryDataFilepublic long write(byte[] b,
int start,
int length)
BinaryDataFilewrite in interface BinaryDataFilepublic long length()
BinaryDataFilelength in interface BinaryDataFilepublic void truncate(long length)
BinaryDataFiletruncate in interface BinaryDataFilepublic void sync()
sync in interface org.apache.jena.atlas.lib.Syncsync in interface BinaryDataFilepublic void close()
close in interface org.apache.jena.atlas.lib.Closeableclose in interface BinaryDataFileLicensed under the Apache License, Version 2.0