public class

FileInfo

extends Object
implements BaseFileInfo
java.lang.Object
   ↳ com.pdftron.pdf.model.FileInfo

Class Overview

Facility class for file.

Note: Please make sure you'll make necessary changes to FileInfo(JSONObject) function if you insert new params or change variable names. Otherwise existing users may lose entire data.

Summary

Constants
int HEADER_TYPE_EARLIER
int HEADER_TYPE_THIS_WEEK
int HEADER_TYPE_TODAY
[Expand]
Inherited Constants
From interface com.pdftron.pdf.model.BaseFileInfo
Public Constructors
FileInfo(FileInfo another)
Class constructor
FileInfo(int type, File file)
Class constructor
FileInfo(int type, File file, int lastPage)
Class constructor
FileInfo(FileInfo another, String newName)
Constructs a new FileInfo based on the input FileInfo and a new file name.
FileInfo(int type, File file, boolean isSecured, int lastPage)
Class constructor
FileInfo(int type, String fileUri)
FileInfo(int type, String fileUri, String filename, boolean isSecured, int lastPage)
Class constructor
FileInfo(int type, String headerText, int headerType)
Class constructor when used as a header
FileInfo(JSONObject jsonObject)
Class constructor
Public Methods
boolean equals(Object o)
boolean exists()
Whether this file exists
String getAbsolutePath()
int getBookmarkDialogCurrentTab()
String getBytes()
String getExtension()
File getFile()
int[] getFileCount()
String getFileName()
int getFileType()
Gets file type
int getHScrollPos()
String getHeaderText()
String getIdentifier()
int getLastPage()
String getModifiedDate()
String getName()
PDFViewCtrl.PagePresentationMode getPagePresentationMode()
int getPageRotation()
String getParentDirectoryPath()
Long getRawModifiedDate()
int getReflowTextSize()
int getSectionFirstPos()
long getSize()
String getSizeInfo()
int getType()
Returns the file type.
int getVScrollPos()
double getZoom()
int hashCode()
boolean isDirectory()
boolean isEarlierHeading()
boolean isHeader()
boolean isHidden()
boolean isPackage()
boolean isReflowMode()
boolean isRtlMode()
boolean isSecured()
boolean isThisWeekHeading()
boolean isTodayHeading()
void setBookmarkDialogCurrentTab(int index)
Sets the index of selected tab in bookmark dialog.
void setHScrollPos(int hScrollPos)
Sets the horizontal scroll position.
void setHeader(boolean isHeader)
Sets if this is header.
void setHidden(boolean isHidden)
Sets if this is hidden
void setIsPackage(boolean value)
Sets if the file is a package.
void setIsSecured(boolean value)
Sets if the file is secured.
void setLastPage(int lastPage)
Sets the last page.
void setPagePresentationMode(PDFViewCtrl.PagePresentationMode pagePresentationMode)
Sets the page presentation mode.
void setPageRotation(int rotation)
Sets the page rotation.
void setReflowMode(boolean inReflowMode)
Sets reflow mode.
void setReflowTextSize(int textSize)
Sets the text size in reflow mode.
void setRtlMode(boolean isRtlMode)
Sets right-to-left mode.
void setSectionFirstPos(int sectionFirstPos)
Sets first position in section.
void setVScrollPos(int vScrollPos)
Sets the horizontal scroll position.
void setZoom(double zoom)
Sets the zoom level.
[Expand]
Inherited Methods
From class java.lang.Object
From interface com.pdftron.pdf.model.BaseFileInfo

Constants

public static final int HEADER_TYPE_EARLIER

Constant Value: 2 (0x00000002)

public static final int HEADER_TYPE_THIS_WEEK

Constant Value: 1 (0x00000001)

public static final int HEADER_TYPE_TODAY

Constant Value: 0 (0x00000000)

Public Constructors

public FileInfo (FileInfo another)

Class constructor

public FileInfo (int type, File file)

Class constructor

public FileInfo (int type, File file, int lastPage)

Class constructor

public FileInfo (FileInfo another, String newName)

Constructs a new FileInfo based on the input FileInfo and a new file name.

public FileInfo (int type, File file, boolean isSecured, int lastPage)

Class constructor

public FileInfo (int type, String fileUri)

public FileInfo (int type, String fileUri, String filename, boolean isSecured, int lastPage)

Class constructor

public FileInfo (int type, String headerText, int headerType)

Class constructor when used as a header

public FileInfo (JSONObject jsonObject)

Class constructor

Public Methods

public boolean equals (Object o)

public boolean exists ()

Whether this file exists

Returns
  • True if the file exists

public String getAbsolutePath ()

Returns
  • the absolute path

public int getBookmarkDialogCurrentTab ()

Returns
  • The index of selected tab in bookmark dialog

public String getBytes ()

Returns
  • Gets the number of bytes this file has

public String getExtension ()

Returns
  • the file extension

public File getFile ()

Returns
  • the file

public int[] getFileCount ()

Returns
  • the number of files this file/folder contains

public String getFileName ()

Returns

public int getFileType ()

Gets file type

Returns
  • The file type

public int getHScrollPos ()

Returns
  • The horizontal scroll position

public String getHeaderText ()

public String getIdentifier ()

public int getLastPage ()

Returns
  • the last page

public String getModifiedDate ()

Returns
  • the last modified date

public String getName ()

Returns
  • the name of file

public PDFViewCtrl.PagePresentationMode getPagePresentationMode ()

Returns
  • The page presentation mode.

public int getPageRotation ()

Returns
  • The page rotation

public String getParentDirectoryPath ()

Returns
  • the parent directory path

public Long getRawModifiedDate ()

Returns
  • the last modified date

public int getReflowTextSize ()

Returns
  • The text size ranging from 0 to 100

public int getSectionFirstPos ()

Returns
  • The first position in section

public long getSize ()

public String getSizeInfo ()

Returns
  • the size of file which be readable by human. If the file is not valid returns empty string.

public int getType ()

Returns the file type.

Returns
  • the file type

public int getVScrollPos ()

Returns
  • The vertical scroll position

public double getZoom ()

Returns
  • The zoom level

public int hashCode ()

public boolean isDirectory ()

Returns
  • True if this is a directory

public boolean isEarlierHeading ()

public boolean isHeader ()

Returns
  • True if this is a header

public boolean isHidden ()

Returns
  • True if this is hidden

public boolean isPackage ()

Returns
  • True if the file is a package

public boolean isReflowMode ()

Returns
  • True if reflow mode is enabled

public boolean isRtlMode ()

Returns
  • True if right-to-left mode is enabled

public boolean isSecured ()

Returns
  • True if the file is secured

public boolean isThisWeekHeading ()

public boolean isTodayHeading ()

public void setBookmarkDialogCurrentTab (int index)

Sets the index of selected tab in bookmark dialog.

Parameters
index The index of selected tab in bookmark dialog

public void setHScrollPos (int hScrollPos)

Sets the horizontal scroll position.

Parameters
hScrollPos The horizontal scroll position

public void setHeader (boolean isHeader)

Sets if this is header.

Parameters
isHeader True if it is header

public void setHidden (boolean isHidden)

Sets if this is hidden

Parameters
isHidden True if hidden

public void setIsPackage (boolean value)

Sets if the file is a package.

Parameters
value True if the file is a package

public void setIsSecured (boolean value)

Sets if the file is secured.

Parameters
value True if the file is secured

public void setLastPage (int lastPage)

Sets the last page.

Parameters
lastPage The last page

public void setPagePresentationMode (PDFViewCtrl.PagePresentationMode pagePresentationMode)

Sets the page presentation mode.

Parameters
pagePresentationMode The page presentation mode.

public void setPageRotation (int rotation)

Sets the page rotation.

Parameters
rotation The page rotation

public void setReflowMode (boolean inReflowMode)

Sets reflow mode.

Parameters
inReflowMode True if reflow mode is enabled, False otherwise

public void setReflowTextSize (int textSize)

Sets the text size in reflow mode.

Parameters
textSize The text size ranging from 0 to 100

public void setRtlMode (boolean isRtlMode)

Sets right-to-left mode.

Parameters
isRtlMode True if right-to-left mode is enabled

public void setSectionFirstPos (int sectionFirstPos)

Sets first position in section.

Parameters
sectionFirstPos The first position in section

public void setVScrollPos (int vScrollPos)

Sets the horizontal scroll position.

Parameters
vScrollPos The vertical scroll position

public void setZoom (double zoom)

Sets the zoom level.

Parameters
zoom The zoom level