org.exoplatform.clouddrive.cmis.ecms.viewer.storage
Class PDFViewerStorage.PDFFile

java.lang.Object
  extended by org.exoplatform.clouddrive.cmis.ecms.viewer.storage.PDFViewerStorage.PDFFile
All Implemented Interfaces:
ContentReader
Enclosing class:
PDFViewerStorage

public class PDFViewerStorage.PDFFile
extends Object
implements ContentReader


Nested Class Summary
 class PDFViewerStorage.PDFFile.ImageFile
           
protected  class PDFViewerStorage.PDFFile.PageKey
           
 
Field Summary
protected  File file
           
protected  PDFViewerStorage.FileKey key
           
protected  long lastAcccessed
           
protected  long lastModified
           
protected  Map<String,String> metadata
           
protected  String name
           
protected  int numberOfPages
           
protected  ConcurrentHashMap<PDFViewerStorage.PDFFile.PageKey,PDFViewerStorage.PDFFile.ImageFile> pages
           
 
Constructor Summary
protected PDFViewerStorage.PDFFile(PDFViewerStorage.FileKey key, File file, String name, long lastModified, org.icepdf.core.pobjects.Document document)
           
 
Method Summary
 boolean equals(Object obj)
          
 boolean exists()
           
 long getLastAcccessed()
           
 long getLastModified()
           
 long getLength()
          Content length in bytes.
 Map<String,String> getMetadata()
           
 String getMimeType()
          Content type in MIME format.
 String getName()
           
 int getNumberOfPages()
           
 PDFViewerStorage.PDFFile.ImageFile getPageImage(int page, float rotation, float scale)
           
 InputStream getStream()
          Content stream for reading.
 String getTypeMode()
          Optional representation (UI) mode for this content type.
 boolean remove()
           
 String toString()
          
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

key

protected final PDFViewerStorage.FileKey key

file

protected final File file

name

protected final String name

lastModified

protected final long lastModified

numberOfPages

protected final int numberOfPages

metadata

protected final Map<String,String> metadata

pages

protected final ConcurrentHashMap<PDFViewerStorage.PDFFile.PageKey,PDFViewerStorage.PDFFile.ImageFile> pages

lastAcccessed

protected long lastAcccessed
Constructor Detail

PDFViewerStorage.PDFFile

protected PDFViewerStorage.PDFFile(PDFViewerStorage.FileKey key,
                                   File file,
                                   String name,
                                   long lastModified,
                                   org.icepdf.core.pobjects.Document document)
Method Detail

remove

public boolean remove()

exists

public boolean exists()

getNumberOfPages

public int getNumberOfPages()

getMetadata

public Map<String,String> getMetadata()

getLastModified

public long getLastModified()
Returns:
the lastModified

getLastAcccessed

public long getLastAcccessed()
Returns:
the lastAcccessed

getName

public String getName()
Returns:
the name

getPageImage

public PDFViewerStorage.PDFFile.ImageFile getPageImage(int page,
                                                       float rotation,
                                                       float scale)
                                                throws IOException
Throws:
IOException

getStream

public InputStream getStream()
Description copied from interface: ContentReader
Content stream for reading.

Specified by:
getStream in interface ContentReader
Returns:
InputStream

getMimeType

public String getMimeType()
Content type in MIME format.

Specified by:
getMimeType in interface ContentReader
Returns:
String

getTypeMode

public String getTypeMode()
Optional representation (UI) mode for this content type. Can be null.

Specified by:
getTypeMode in interface ContentReader
Returns:
String a type mode or null if not available.

getLength

public long getLength()
Content length in bytes.

Specified by:
getLength in interface ContentReader
Returns:
Long

equals

public boolean equals(Object obj)

Overrides:
equals in class Object

toString

public String toString()

Overrides:
toString in class Object


Copyright © 2003–2015 eXo Platform SAS. All rights reserved.