Package ghidra.framework.store.local

# Class ItemDeserializer

java.lang.Object
ghidra.framework.store.local.ItemDeserializer

public class ItemDeserializer extends 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(File packedFile)`
  Constructor.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `void`
  `dispose()`
  Close packed-file input stream and free resources.
  `protected void`
  `finalize()`
  `String`
  `getContentType()`
  Returns packed content type
  `int`
  `getFileType()`
  Returns packed file type.
  `String`
  `getItemName()`
  Returns packed item name
  `long`
  `getLength()`
  Returns unpacked data length
  `void`
  `saveItem(OutputStream out, TaskMonitor monitor)`
  Save the item to the specified output stream.

  ### Methods inherited from class java.lang.Object

  `clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Constructor Details

  - ### ItemDeserializer

    public ItemDeserializer(File packedFile) throws IOException
    Constructor.
    Parameters:
      `packedFile` - item to deserialize.
    Throws:
      `IOException`

  - ### ItemDeserializer

    public ItemDeserializer(ResourceFile packedFile) throws IOException
    Throws:
      `IOException`

- ## Method Details

  - ### finalize

    protected void finalize() throws Throwable
    Overrides:
      `finalize` in class `Object`
    Throws:
      `Throwable`

  - ### dispose

    public void dispose()
    Close packed-file input stream and free resources.

  - ### getItemName

    public String getItemName()
    Returns packed item name

  - ### getContentType

    public 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(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:
      `IOException`
      `IOCancelledException`