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 Summary
Modifier and TypeMethodDescriptionbyte[]
void
getContent
(File file) Retrieves the attachment content as a file object.void
getContent
(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 finishedlong
getSize()
boolean
void
setContent
(byte[] content) Allow to set the content of the attachment by passing an array of bytes.void
setContent
(File file) Allow to set the content of the attachment by passing aFile
object.void
setContent
(InputStream readStream) Allow to set the content of the attachment by passing aInputStream
object.void
Allow to set the system name of the attachmentMethods inherited from interface com.axemble.vdoc.sdk.interfaces.IElement
getId, getModule, getNativeObject, getPath, save
Methods inherited from interface com.axemble.vdoc.sdk.supports.IProtocolSupport
getProtocolURI, getProtocolURI
Methods inherited from interface com.axemble.vdoc.sdk.supports.IUriSupport
getURI
-
Method Details
-
getName
String getName()- Returns:
- The system name of the attachment
-
setName
Allow to set the system name of the attachment- Parameters:
name
- The name to set
-
getShortName
String getShortName()- Returns:
- The short name of the attachment
-
getCreatedDate
Date getCreatedDate()- Returns:
- The created date
-
getModifiedDate
Date getModifiedDate()- Returns:
- The last modified date
-
getSize
long getSize()- Returns:
- The size of the attachment
-
setContent
Allow to set the content of the attachment by passing aFile
object.- Parameters:
file
- The file object
-
setContent
Allow to set the content of the attachment by passing aInputStream
object.- Parameters:
readStream
- The input stream.
-
setContent
void setContent(byte[] content) Allow to set the content of the attachment by passing an array of bytes.- Parameters:
content
- The array of bytes.
-
getContent
Retrieves the attachment content as a file object.- Parameters:
file
- The file object to write to.
-
getContent
Retrieves the attachment content as a stream .- Parameters:
outputStream
- The output stream to write to.
-
getContent
byte[] getContent() -
getInputStream
Get the stream to read the content Look out to close the stream when finished- Returns:
- InputStream the stream to read
- Throws:
IOException
-
getOutputStream
Get the stream to writte the content Look out to close the stream when finished- Returns:
- OutputStream the stream to writte
- Throws:
IOException
-
isReadable
boolean isReadable()
-