Package ghidra.framework.store.local
Class ItemDeserializer
java.lang.Object
ghidra.framework.store.local.ItemDeserializer
ItemDeserializer facilitates the reading of a compressed data stream
contained within a "packed" file. A "packed" file contains the following meta-data
which is available after construction:
- Item name
- Content type (int)
- File type (int)
- Data length
-
Constructor Summary
ConstructorsConstructorDescriptionItemDeserializer(ResourceFile packedFile) ItemDeserializer(File packedFile) Constructor. -
Method Summary
Modifier and TypeMethodDescriptionvoiddispose()Close packed-file input stream and free resources.protected voidfinalize()Returns packed content typeintReturns packed file type.Returns packed item namelongReturns unpacked data lengthvoidsaveItem(OutputStream out, TaskMonitor monitor) Save the item to the specified output stream.
-
Constructor Details
-
ItemDeserializer
Constructor.- Parameters:
packedFile- item to deserialize.- Throws:
IOException
-
ItemDeserializer
- Throws:
IOException
-
-
Method Details
-
finalize
-
dispose
public void dispose()Close packed-file input stream and free resources. -
getItemName
Returns packed item name -
getContentType
Returns packed content type -
getFileType
public int getFileType()Returns packed file type. -
getLength
public long getLength()Returns unpacked data length -
saveItem
public void saveItem(OutputStream out, TaskMonitor monitor) throws IOCancelledException, IOException Save the item to the specified output stream. This method may only be invoked once.- Parameters:
out-monitor-- Throws:
IOExceptionIOCancelledException
-