Package org.verapdf.processor.reports
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 Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static ItemDetailsdefaultInstance()static ItemDetailsfromFile(File file)static ItemDetailsfromValues(String name)static ItemDetailsfromValues(String name, long size)StringgetName()longgetSize()
-
-
-
Method Detail
-
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- theFileto extract details from- Returns:
- a new
ItemDetailsinstance initialised from the passed file.
-
fromValues
public static ItemDetails fromValues(String name)
- Parameters:
name- a name to identify the item- Returns:
- a new
ItemDetailsinstance 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 itemsize- the size of the item in bytes.- Returns:
- a new
ItemDetailsinstance initialised from the passed parameters
-
defaultInstance
public static ItemDetails defaultInstance()
- Returns:
- the default ItemDetails instance
-
-