|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.ados.hestia.parser.rnbm.exchange.Attachment
public class Attachment
This stores attachment of RNBM. Can be created from
file. See Utils.getAttachment.
Field Summary | |
---|---|
protected String |
m_contentID
|
protected String |
m_contentType
|
protected String |
m_description
|
protected String |
m_name
|
protected IStore |
m_store
|
Constructor Summary | |
---|---|
Attachment()
|
|
Attachment(String name,
String contentType,
InputStream istr)
Construct attachment by reading content from provided stream. |
|
Attachment(String name,
String contentType,
IStore store)
Construct attachment directly from store. |
Method Summary | |
---|---|
String |
getContentID()
Returns unique id of attachment. |
String |
getContentType()
Returns content type of attachment. |
String |
getDescription()
Returns attachment description or null if not present. |
String |
getName()
Returns name, associated with attachment. |
long |
getSize()
Returns size of content of attachment. |
IStore |
getStore()
Returns associated store. |
InputStream |
openSharedStream()
|
InputStream |
openStream()
Returns stream with content of attachment. |
void |
setContentID(String contentID)
Set attachment id. |
void |
setStore(IStore store)
Set base store. |
String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
protected String m_name
protected String m_contentType
protected String m_description
protected String m_contentID
protected IStore m_store
Constructor Detail |
---|
public Attachment()
public Attachment(String name, String contentType, InputStream istr) throws IOException
name
- name of streamcontentType
- content type of stream. Can be null for automatically detectistr
- stream to read content. Will be closed after reading
IOException
public Attachment(String name, String contentType, IStore store)
name
- name of attachmentcontentType
- content type of attachment. Can be nullstore
- direct content of attachmentMethod Detail |
---|
public void setContentID(String contentID)
contentID
- id to setpublic String getContentID()
public String getName()
public String getContentType()
public long getSize()
public InputStream openStream() throws IOException
IOException
public InputStream openSharedStream() throws IOException
IOException
public String getDescription()
public String toString()
toString
in class Object
Object.toString()
public IStore getStore()
public void setStore(IStore store)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |