- IItemReader: Read-only access to item properties and content
- IItem: Full read-write access for processing tasks
IItemReader Interface
TheIItemReader interface provides read-only access to evidence items. It is the base interface extended by IItem.
Package: iped.dataSource:
iped-api/src/main/java/iped/data/IItemReader.java
Basic Properties
Returns the unique identifier of the item within the case
Returns the filename of the item
Returns the full path of the item including parent directories
Returns the size of the item in bytes
Returns the hash value of the item (if computed during processing)
Example: Basic Property Access
/api/item-api.mdx:55:72
File Type Information
Returns the original file extension
Returns the detected file type extension based on signature analysis
Returns the Apache Tika MediaType detected from file signature analysis
Returns the set of categories assigned to this item
Example: File Type Detection
Hierarchical Properties
Returns the ID of the parent item (null if root level)
Returns the subitem order within its parent, or null if not a subitem
Returns true if this is a subitem extracted from a container (e.g., file within a ZIP)
Returns true if the item is a directory
Returns true if this is a root item
Returns true if the item has child items (subitems or carved items)
Example: Navigating Hierarchy
State Flags
Returns true if the item is a deleted file
Returns true if the item was recovered through data carving
Returns true if parsing of the item resulted in a timeout
Timestamps
Returns the last modification date of the file
Returns the creation date of the file
Returns the last access date of the file
Returns the change date of the file (filesystem metadata change)
Example: Date Analysis
Content Access
Returns a buffered input stream to read the item’s raw content. Preferred method for streaming access.
Returns a seekable input stream allowing random access to content
Returns an ImageInputStream for image processing
Returns a temporary file containing the item’s content. Avoid using if you can work with streams, as this spools data to disk.
Returns a factory for creating multiple input streams to the same item
Example: Reading Content
Preview and Thumbnails
Returns true if a preview/view file exists for this item
Returns the view/preview file path (relative to case), or null if none exists
Returns the file extension of the preview file
Returns the thumbnail image as a byte array
Metadata
Returns the Apache Tika Metadata object containing all extracted metadata
Returns the value of a custom extra attribute set by processing modules
Returns the map of all extra attributes
Example: Accessing Metadata
Data Source
Returns the data source (evidence) that contains this item
Returns the identifier of this item within its original data source
IItem Interface
TheIItem interface extends IItemReader with write operations for use in processing tasks.
Package: iped.dataSource:
iped-api/src/main/java/iped/data/IItem.java
Modifying Properties
Sets the filename
Sets the file extension
Sets the detected media type
Sets the file size in bytes
Sets the hash value
Category Management
Adds the item to a category
Removes the item from a category
Replaces all categories with a single category
Example: Category Management
State Management
Marks the item as deleted
Marks the item as recovered through carving
Marks the item to be ignored by subsequent processing tasks and excluded from the case
Sets whether the item should be added to the final case
Sets whether the item should be extracted/exported
Extra Attributes
Sets a custom extra attribute that will be indexed and searchable
Sets a temporary attribute (not indexed, used only during processing)
Example: Custom Attributes in Task
Resource Management
Releases resources used by the item, including temporary files and file handles. Important: Always call when done processing.
Creates a new child item (subitem) of this item. Used when extracting embedded content.
Example: Creating Subitems
IIPEDSource Interface
TheIIPEDSource interface provides access to IPED cases and their indices.
Package: iped.dataSource:
iped-api/src/main/java/iped/data/IIPEDSource.java
Opening Cases
Opens an IPED case from the specified directory
Retrieving Items
Returns the item with the specified ID
Returns the item with the specified Lucene document ID
Converts item ID to Lucene document ID
Converts Lucene document ID to item ID
Case Information
Returns the case directory
Returns the IPED module directory (containing index, data, etc.)
Returns the total number of items in the case
Returns the highest item ID in the case
Index Access
Returns the Lucene IndexReader for low-level index access
Returns the Lucene IndexSearcher for executing queries
Returns the Lucene Analyzer used for text analysis
Categories and Metadata
Returns the list of leaf-level categories in the case
Returns the set of extra attribute names defined in the case
Returns the set of keywords/search terms saved in the case
Example: Case Statistics
Best Practices
See Also
- Search API - Query and filter items
- Task API - Build custom processing tasks
- Web API - Remote item access via REST