Class ItemDetails

java.lang.Object
org.verapdf.processor.reports.ItemDetails

public class ItemDetails extends Object
Encapsulates the details of a PDF document, just the name and the size in bytes.
Author:
Carl Wilson
  • Method Details

    • getName

      public String getName()
      Returns:
      the item name
    • getSize

      public long getSize()
      Returns:
      the size of the item in bytes
    • fromFile

      public static ItemDetails fromFile(File file)
      Parameters:
      file - the File to extract details from
      Returns:
      a new ItemDetails instance initialised from the passed file.
    • fromValues

      public static ItemDetails fromValues(String name)
      Parameters:
      name - a name to identify the item
      Returns:
      a new ItemDetails instance with the given name and -1 (unknown) as the size in bytes;
    • fromValues

      public static ItemDetails fromValues(String name, long size)
      Parameters:
      name - a name to identify the item
      size - the size of the item in bytes.
      Returns:
      a new ItemDetails instance initialised from the passed parameters
    • defaultInstance

      public static ItemDetails defaultInstance()
      Returns:
      the default ItemDetails instance