org.odftoolkit.odfdom.pkg.manifest
Class OdfFileEntry
java.lang.Object
org.odftoolkit.odfdom.pkg.manifest.OdfFileEntry
public class OdfFileEntry
- extends Object
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
OdfFileEntry
public OdfFileEntry()
OdfFileEntry
public OdfFileEntry(String path)
- Parameters:
path
- the path of the
Use null
for no mediaType
OdfFileEntry
public OdfFileEntry(String path,
String mediaType)
- Parameters:
path
- the path of the mediaType
- of the file.
Use null
for no mediaType
OdfFileEntry
public OdfFileEntry(String path,
String mediaType,
int size)
setPath
public void setPath(String path)
getPath
public String getPath()
setMediaTypeString
public void setMediaTypeString(String mediaType)
- Parameters:
mediaType
- of the file.
Use null
or an empty string to unset the mediaType to an empty string.
getMediaTypeString
public String getMediaTypeString()
- Returns:
- the mediatype of the mandatory <manifest:file-entry> attribute.
If no mediatype exists an empty string is returned
getMediaTypeString
public static String getMediaTypeString(String fileRef)
- Get the media type from the given file reference
- Parameters:
fileRef
- the reference to the file the media type is questioned
- Returns:
- the mediaType string of the given file reference
setSize
public void setSize(int size)
getSize
public int getSize()
- get the size or -1 if not set
setEncryptionData
public void setEncryptionData(EncryptionData encryptionData)
getEncryptionData
public EncryptionData getEncryptionData()
- Returns:
- null if no encryption data had been set
Copyright © 2008-2011 The Apache Software Foundation. All Rights Reserved.