public class FileContentItem extends FileContentEntity implements ContentItem
| Constructor and Description |
|---|
FileContentItem(ContentLocation parent,
File backend)
Creates a new file based content item for the given file and parent location.
|
| Modifier and Type | Method and Description |
|---|---|
InputStream |
getInputStream()
Tries to open and return a input stream for reading from the content item.
|
String |
getMimeType()
Returns the mime type for the content entity.
|
OutputStream |
getOutputStream()
Tries to open and return a output stream for writing into the content item.
|
boolean |
isReadable()
Checks, whether the content item is readable.
|
boolean |
isWriteable()
Checks, whether the content item is writable.
|
delete, getAttribute, getContentId, getName, getParent, getRepository, setAttributeequals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitdelete, getAttribute, getContentId, getName, getParent, getRepository, setAttributepublic FileContentItem(ContentLocation parent, File backend)
parent - the parent.backend - the backend.public String getMimeType() throws ContentIOException
ContentItemgetMimeType in interface ContentItemContentIOException - if an error occured.public OutputStream getOutputStream() throws ContentIOException, IOException
ContentItemgetOutputStream in interface ContentItemContentIOException - if an repository related error prevents the creation of the output stream.IOException - if an IO error occurs.public InputStream getInputStream() throws ContentIOException, IOException
ContentItemgetInputStream in interface ContentItemContentIOException - if an repository related error prevents the creation of the input stream.IOException - if an IO error occurs.public boolean isReadable()
ContentItemisReadable in interface ContentItempublic boolean isWriteable()
ContentItemisWriteable in interface ContentItem