Package com.nt.udc.nar
Class NARStorageFile
java.lang.Object
com.nt.udc.util.ObjectStorageFile
com.nt.udc.nar.NARStorageFile
-
Field Summary
Fields inherited from class com.nt.udc.util.ObjectStorageFile
allocator, currentStorageSize, headers, headers_no_flag, invalid_flags, INVALID_OBJ, MAX_PARTITION_SIZE, maxPartitionSize, OBJ_HEADER, objectFile, partitioned, time_used, valid_flags, VALID_OBJ
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected byte[]
getDataToBytes
(int narLength) protected byte[]
static void
Prints out the NAR's in a NARStorageFile to standard out.protected Object
objectFromBytes
(byte[] bytes) This method should return an Object, as created by the given bytes.protected byte[]
objectToBytes
(Object obj) This method should return the Object in its byte[] format.protected int
Methods inherited from class com.nt.udc.util.ObjectStorageFile
add, addBytes, allocatorReport, close, drop, get, getBytes, getNumObjects, getObjectFile, getSomeObjects, getValidOffsets, isEmpty, isNewFile, markDeletedBytes, open, remove, removeBytes, removeDelayedParsing, restoreFile, setPartition, setupWalker, setupWalker, toString, toString, update, walkFile
-
Constructor Details
-
NARStorageFile
-
-
Method Details
-
getObjectBytes
- Throws:
IOException
-
getDataToBytes
- Throws:
IOException
-
skipObjectBytes
- Throws:
IOException
-
objectFromBytes
Description copied from class:ObjectStorageFile
This method should return an Object, as created by the given bytes. If, for whatever reason, the Object could not be created from these bytes, this method should return null.- Specified by:
objectFromBytes
in classObjectStorageFile
- Parameters:
bytes
- byte[] used to create the Object- Returns:
- A valid Object, created from the bytes.
-
objectToBytes
Description copied from class:ObjectStorageFile
This method should return the Object in its byte[] format.- Specified by:
objectToBytes
in classObjectStorageFile
- Parameters:
obj
- Object to convert to bytes.- Returns:
- bytes of the Object
-
main
Prints out the NAR's in a NARStorageFile to standard out. Arguments: args[0] - Path to NARStorageFile.
-