|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.pentaho.reporting.libraries.repository.stream.StreamContentItem
public class StreamContentItem
A stream-content item that wraps around the input and output streams given in the repository. Depending on which stream are given, this item reports itself as read or writable.
Constructor Summary | |
---|---|
StreamContentItem(java.lang.String name,
ContentLocation parent,
WrappedInputStream inputStream,
WrappedOutputStream outputStream)
Creates a new stream-content item. |
Method Summary | |
---|---|
boolean |
delete()
Stream-repositories do not support the deletion of entries. |
java.lang.Object |
getAttribute(java.lang.String domain,
java.lang.String key)
Stream-Repositories do not support attributes. |
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)
Stream-Repositories do not support attributes. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public StreamContentItem(java.lang.String name, ContentLocation parent, WrappedInputStream inputStream, WrappedOutputStream outputStream)
name
- the name of the content item.parent
- the parent location.inputStream
- the (optional) input stream.outputStream
- the (optional) output stream.Method Detail |
---|
public boolean isReadable()
isReadable
in interface ContentItem
public boolean isWriteable()
isWriteable
in interface ContentItem
public java.lang.String getMimeType() throws ContentIOException
getMimeType
in interface ContentItem
ContentIOException
- if an error occured.public java.io.OutputStream getOutputStream() throws ContentIOException, java.io.IOException
getOutputStream
in interface ContentItem
ContentIOException
- 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
getInputStream
in interface ContentItem
ContentIOException
- if an repository related error prevents the creation of the input stream.
java.io.IOException
- if an IO error occurs.public java.lang.String getName()
getName
in interface ContentEntity
public java.lang.Object getContentId()
getContentId
in interface ContentEntity
public java.lang.Object getAttribute(java.lang.String domain, java.lang.String key)
getAttribute
in interface ContentEntity
domain
- the attribute domain.key
- the name of the attribute.
public boolean setAttribute(java.lang.String domain, java.lang.String key, java.lang.Object value)
setAttribute
in interface ContentEntity
domain
- the attribute domain.key
- the attribute namevalue
- the new attribute value.
public ContentLocation getParent()
getParent
in interface ContentEntity
public Repository getRepository()
getRepository
in interface ContentEntity
public boolean delete()
delete
in interface ContentEntity
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |