public class ZipContentItem extends java.lang.Object implements ContentItem
| Constructor and Description |
|---|
ZipContentItem(ZipRepository repository,
ZipContentLocation parent,
java.lang.String name) |
ZipContentItem(ZipRepository repository,
ZipContentLocation parent,
java.util.zip.ZipEntry zipEntry,
byte[] bytes) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
delete()
Attempts to delete the entity.
|
java.lang.Object |
getAttribute(java.lang.String domain,
java.lang.String key)
Returns a attribute value for the given domain (namespace) and attribute-name.
|
java.lang.Object |
getContentId()
Returns a unique identifier.
|
java.io.InputStream |
getInputStream()
Tries to open and return a input stream for reading from the content item.
|
java.lang.String |
getMimeType()
Returns the mime type for the content entity.
|
java.lang.String |
getName()
Returns the name of the entry.
|
java.io.OutputStream |
getOutputStream()
Tries to open and return a output stream for writing into the content item.
|
ContentLocation |
getParent()
Returns a reference to the parent location.
|
Repository |
getRepository()
Returns the current repository, to which tis entity belongs.
|
boolean |
isReadable()
Checks, whether the content item is readable.
|
boolean |
isWriteable()
Checks, whether the content item is writable.
|
boolean |
setAttribute(java.lang.String domain,
java.lang.String key,
java.lang.Object value)
Updates the attribute value for the given attribute domain and name.
|
void |
setRawData(byte[] rawData,
long size,
long crc32)
This method is a internal method.
|
public ZipContentItem(ZipRepository repository, ZipContentLocation parent, java.util.zip.ZipEntry zipEntry, byte[] bytes)
public ZipContentItem(ZipRepository repository, ZipContentLocation parent, java.lang.String name)
public void setRawData(byte[] rawData,
long size,
long crc32)
rawData - size - crc32 - public java.lang.String getMimeType()
throws ContentIOException
ContentItemgetMimeType in interface ContentItemContentIOException - if an error occured.public java.io.OutputStream getOutputStream()
throws ContentIOException,
java.io.IOException
ContentItemgetOutputStream in interface ContentItemContentIOException - if an repository related error prevents the creation of the output stream.java.io.IOException - if an IO error occurs.public java.io.InputStream getInputStream()
throws ContentIOException,
java.io.IOException
ContentItemgetInputStream in interface ContentItemContentIOException - if an repository related error prevents the creation of the input stream.java.io.IOException - if an IO error occurs.public boolean isReadable()
ContentItemisReadable in interface ContentItempublic boolean isWriteable()
ContentItemisWriteable in interface ContentItempublic java.lang.String getName()
ContentEntitygetName in interface ContentEntitypublic java.lang.Object getContentId()
ContentEntitygetContentId in interface ContentEntitypublic java.lang.Object getAttribute(java.lang.String domain,
java.lang.String key)
ContentEntityLibRepositoryBoot class.getAttribute in interface ContentEntitydomain - the attribute domain.key - the name of the attribute.public boolean setAttribute(java.lang.String domain,
java.lang.String key,
java.lang.Object value)
ContentEntitysetAttribute in interface ContentEntitydomain - the attribute domain.key - the attribute namevalue - the new attribute value.public ContentLocation getParent()
ContentEntitygetParent in interface ContentEntitypublic Repository getRepository()
ContentEntitygetRepository in interface ContentEntitypublic boolean delete()
ContentEntitydelete in interface ContentEntity