java.lang.Object
org.apache.jena.tdb1.base.objectfile.ObjectFileWrapper
- All Implemented Interfaces:
org.apache.jena.atlas.lib.Closeable,org.apache.jena.atlas.lib.Sync,ObjectFile
- Direct Known Subclasses:
ObjectFileReadonly,ObjectFileSwitcher
An ObjectFile is an append-read file, that is you can append data
to the stream or read any block.
-
Field Summary
Fields inherited from interface org.apache.jena.tdb1.base.objectfile.ObjectFile
type -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionIterator<org.apache.jena.atlas.lib.Pair<Long,ByteBuffer>> all()All the contents as ByteBuffers - debugging aidvoidclose()getLabel()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.voidsync()voidtruncate(long size) Truncate the filelongwrite(ByteBuffer buffer) Write out the buffer - return the accessor number
-
Constructor Details
-
ObjectFileWrapper
-
-
Method Details
-
write
Description copied from interface:ObjectFileWrite out the buffer - return the accessor number- Specified by:
writein interfaceObjectFile
-
reposition
public void reposition(long id) Description copied from interface:ObjectFileReset the "append" point; may only be moved earlier. The new position must correspond to a position returned byObjectFile.write(ByteBuffer).- Specified by:
repositionin interfaceObjectFile
-
truncate
public void truncate(long size) Description copied from interface:ObjectFileTruncate the file- Specified by:
truncatein interfaceObjectFile
-
read
Description copied from interface:ObjectFileRead a buffer at the accessor number.- Specified by:
readin interfaceObjectFile
-
getLabel
Description copied from interface:ObjectFileA label to identify this ObjectFile- Specified by:
getLabelin interfaceObjectFile
-
all
Description copied from interface:ObjectFileAll the contents as ByteBuffers - debugging aid- Specified by:
allin interfaceObjectFile
-
sync
public void sync()- Specified by:
syncin interfaceorg.apache.jena.atlas.lib.Sync
-
close
public void close()- Specified by:
closein interfaceorg.apache.jena.atlas.lib.Closeable
-
length
public long length()Description copied from interface:ObjectFileLength, in units used by read/write for ids- Specified by:
lengthin interfaceObjectFile
-
isEmpty
public boolean isEmpty()Description copied from interface:ObjectFileAny objects in this file?- Specified by:
isEmptyin interfaceObjectFile
-