Package ghidra.framework.store.local
Class ItemDeserializer
- java.lang.Object
-
- ghidra.framework.store.local.ItemDeserializer
-
public class ItemDeserializer extends java.lang.ObjectItemDeserializerfacilitates 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 voiddispose()Close packed-file input stream and free resources.protected voidfinalize()java.lang.StringgetContentType()Returns packed content typeintgetFileType()Returns packed file type.java.lang.StringgetItemName()Returns packed item namelonggetLength()Returns unpacked data lengthvoidsaveItem(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.IOExceptionConstructor.- 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:
finalizein 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.IOExceptionSave the item to the specified output stream. This method may only be invoked once.- Parameters:
out-monitor-- Throws:
java.io.IOExceptionIOCancelledException
-
-