Package ghidra.framework.store.local
Class ItemDeserializer
- java.lang.Object
-
- ghidra.framework.store.local.ItemDeserializer
-
public class ItemDeserializer extends java.lang.Object
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
Constructors Constructor Description ItemDeserializer(ResourceFile packedFile)
ItemDeserializer(java.io.File packedFile)
Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
dispose()
Close packed-file input stream and free resources.protected void
finalize()
java.lang.String
getContentType()
Returns packed content typeint
getFileType()
Returns packed file type.java.lang.String
getItemName()
Returns packed item namelong
getLength()
Returns unpacked data lengthvoid
saveItem(java.io.OutputStream out, TaskMonitor monitor)
Save the item to the specified output stream.
-
-
-
Constructor Detail
-
ItemDeserializer
public ItemDeserializer(java.io.File packedFile) throws java.io.IOException
Constructor.- Parameters:
in
- input stream. The input stream must not be read again until after the saveItem method has been invoked successfully.- Throws:
java.io.IOException
-
ItemDeserializer
public ItemDeserializer(ResourceFile packedFile) throws java.io.IOException
- Throws:
java.io.IOException
-
-
Method Detail
-
finalize
protected void finalize() throws java.lang.Throwable
- Overrides:
finalize
in classjava.lang.Object
- Throws:
java.lang.Throwable
-
dispose
public void dispose()
Close packed-file input stream and free resources.
-
getItemName
public java.lang.String getItemName()
Returns packed item name
-
getContentType
public java.lang.String 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(java.io.OutputStream out, TaskMonitor monitor) throws IOCancelledException, java.io.IOException
Save the item to the specified output stream. This method may only be invoked once.- Parameters:
out
-monitor
-- Throws:
java.io.IOException
IOCancelledException
-
-