public interface File extends MediaElement
Modifier and Type | Method and Description |
---|---|
long |
getCrc()
Get the crc of the file or -1 if crc isn't set
|
String |
getDescription()
Get the description of the current media
|
String |
getEncoding()
Get the encoding of the current file-media
|
String |
getExtension()
Get the extension
|
Revision |
getFileRevision()
Return file content revision or
null if no content exits. |
InputStream |
getInputStream()
Returns the file content as inputstream.
|
Language |
getLanguage()
Get the language of the current file-media
|
MimeType |
getMimeType()
Get the mime-type.
|
TemplateDocument |
getParsedFile()
Returns the parsed file content, if
, else
null . |
byte[] |
getPreviewImage()
Get a small preview/thumbnail image of this picture
|
long |
getSize()
Get the size of the file or -1 if size isn't set
|
void |
setDescription(String description)
Set the description of the current media
|
void |
setEncoding(String encoding)
Set the encoding of the current file-media
|
void |
setExtension(String extension)
Set the Extension
|
void |
setFile(long length,
InputStream file,
String extension) |
void |
setPreviewImage(byte[] bytes)
Set a the image data source to create a preview-thumbnail from.
|
appendChild, appendChildBefore, delete, exportStoreElement, getChildCount, getChildIndex, getChildren, getChildren, getChildren, getChildren, getCreateWorkflowPermission, getDefinedPrincipalPermissions, getEditor, getElementType, getFirstChild, getIncomingReferences, getInheritedPrincipalPermissions, getLastChanged, getName, getNextSibling, getOutgoingReferences, getParent, getPermission, getPermission, getPermission, getProject, getReferenceName, getReferences, getStore, getTreePermission, getWorkflowPermission, getWorkflowPermissions, getWriteLock, hasIncomingReferences, hasPermissions, importStoreElement, importStoreElements, inheritWorkflowPermission, isDeleted, isExportSupported, isFolder, isImportSupported, isLocked, isLockedOnServer, isLockSupported, isPermissionSupported, isWorkflowAllowed, isWorkflowSupported, refresh, removeAllWorkflowPermissions, removeChild, removePermission, removePermission, removePermission, removeWorkflowPermission, replaceChild, save, save, save, setInheritWorkflowPermission, setLock, setLock, setPermission, setPermission, setPermission, setWorkflowPermission, setWorkflowPermissions, setWriteLock, toXml, toXml, toXml, update
getColor, getTask, hasTask, removeTask, setColor, setTask
compareTo
Language getLanguage()
InputStream getInputStream() throws IOException
IOException
void setFile(long length, InputStream file, String extension) throws IOException
length
- in bytesfile
- InputStreamextension
- the filename extensionIOException
@Nullable byte[] getPreviewImage() throws IOException
IOException
- if any error occurs while obtaining the preview image streamvoid setPreviewImage(@Nullable byte[] bytes)
bytes
- the preview image data or null to unset the preview imageString getEncoding()
void setEncoding(String encoding)
encoding
- new encoding of the file-media e.g. "ISO-8859-1"String getDescription()
void setDescription(String description)
description
- new description of the mediaString getExtension()
void setExtension(String extension)
extension
- the extension@Nullable Revision getFileRevision()
null
if no content exits.long getSize()
long getCrc()
-1
for unkonwnTemplateDocument getParsedFile() throws ParsingError, IOException
Media.getParseFile()
== true
, else
null
.null
ParsingError
IOException
Copyright © 2014 e-Spirit AG. All Rights Reserved. Build 5.0_BETA.500