Package com.axemble.vdoc.sdk.interfaces
Interface IAttachment
- All Superinterfaces:
- IElement,- IProtocolSupport,- IUriSupport,- Serializable
- All Known Implementing Classes:
- PortalAttachment,- SnapshotAttachment
The IAttachment interface represents any attachment in the system.
 It allows to manipulate attachment in a simpler manner.
- Since:
- 1.0, 15/04/2008
- Author:
- vlygeros
- See Also:
- 
Method SummaryModifier and TypeMethodDescriptionbyte[]voidgetContent(File file) Retrieves the attachment content as a file object.voidgetContent(OutputStream outputStream) Retrieves the attachment content as a stream .Get the stream to read the content Look out to close the stream when finishedgetName()Get the stream to writte the content Look out to close the stream when finishedlonggetSize()booleanvoidsetContent(byte[] content) Allow to set the content of the attachment by passing an array of bytes.voidsetContent(File file) Allow to set the content of the attachment by passing aFileobject.voidsetContent(InputStream readStream) Allow to set the content of the attachment by passing aInputStreamobject.voidAllow to set the system name of the attachmentMethods inherited from interface com.axemble.vdoc.sdk.interfaces.IElementgetId, getModule, getNativeObject, getPath, saveMethods inherited from interface com.axemble.vdoc.sdk.supports.IProtocolSupportgetProtocolURI, getProtocolURIMethods inherited from interface com.axemble.vdoc.sdk.supports.IUriSupportgetURI
- 
Method Details- 
getNameString getName()- Returns:
- The system name of the attachment
 
- 
setNameAllow to set the system name of the attachment- Parameters:
- name- The name to set
 
- 
getShortNameString getShortName()- Returns:
- The short name of the attachment
 
- 
getCreatedDateDate getCreatedDate()- Returns:
- The created date
 
- 
getModifiedDateDate getModifiedDate()- Returns:
- The last modified date
 
- 
getSizelong getSize()- Returns:
- The size of the attachment
 
- 
setContentAllow to set the content of the attachment by passing aFileobject.- Parameters:
- file- The file object
 
- 
setContentAllow to set the content of the attachment by passing aInputStreamobject.- Parameters:
- readStream- The input stream.
 
- 
setContentvoid setContent(byte[] content) Allow to set the content of the attachment by passing an array of bytes.- Parameters:
- content- The array of bytes.
 
- 
getContentRetrieves the attachment content as a file object.- Parameters:
- file- The file object to write to.
 
- 
getContentRetrieves the attachment content as a stream .- Parameters:
- outputStream- The output stream to write to.
 
- 
getContentbyte[] getContent()
- 
getInputStreamGet the stream to read the content Look out to close the stream when finished- Returns:
- InputStream the stream to read
- Throws:
- IOException
 
- 
getOutputStreamGet the stream to writte the content Look out to close the stream when finished- Returns:
- OutputStream the stream to writte
- Throws:
- IOException
 
- 
isReadableboolean isReadable()
 
-