- All Superinterfaces:
org.apache.jena.atlas.lib.Closeable,org.apache.jena.atlas.lib.Sync
- All Known Implementing Classes:
ObjectFileLogger,ObjectFileReadonly,ObjectFileStorage,ObjectFileSwitcher,ObjectFileTransComplex,ObjectFileWrapper
public interface ObjectFile
extends org.apache.jena.atlas.lib.Sync, org.apache.jena.atlas.lib.Closeable
An ObjectFile is an append-read file, that is you can append data
to the stream or read any block.
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionIterator<org.apache.jena.atlas.lib.Pair<Long,ByteBuffer>> all()All the contents as ByteBuffers - debugging aidgetLabel()A label to identify this ObjectFilebooleanisEmpty()Any objects in this file?longlength()Length, in units used by read/write for idsread(long id) Read a buffer at the accessor number.voidreposition(long id) Reset the "append" point; may only be moved earlier.voidtruncate(long size) Truncate the filelongwrite(ByteBuffer buffer) Write out the buffer - return the accessor numberMethods inherited from interface org.apache.jena.atlas.lib.Closeable
closeMethods inherited from interface org.apache.jena.atlas.lib.Sync
sync
-
Field Details
-
type
- See Also:
-
-
Method Details
-
getLabel
String getLabel()A label to identify this ObjectFile -
write
Write out the buffer - return the accessor number -
read
Read a buffer at the accessor number. -
length
long length()Length, in units used by read/write for ids -
isEmpty
boolean isEmpty()Any objects in this file? -
reposition
void reposition(long id) Reset the "append" point; may only be moved earlier. The new position must correspond to a position returned bywrite(ByteBuffer). -
truncate
void truncate(long size) Truncate the file -
all
Iterator<org.apache.jena.atlas.lib.Pair<Long,ByteBuffer>> all()All the contents as ByteBuffers - debugging aid
-