public interface IAttachment extends IElement, IUriSupport, IProtocolSupport
IWorkflowInstance,
IFile| Modifier and Type | Method and Description |
|---|---|
byte[] |
getContent() |
void |
getContent(File file)
Retrieves the attachment content as a file object.
|
void |
getContent(OutputStream outputStream)
Retrieves the attachment content as a stream .
|
Date |
getCreatedDate() |
InputStream |
getInputStream()
Get the stream to read the content
Look out to close the stream when finished
|
Date |
getModifiedDate() |
String |
getName() |
OutputStream |
getOutputStream()
Get the stream to writte the content
Look out to close the stream when finished
|
String |
getShortName() |
long |
getSize() |
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 a
File object. |
void |
setContent(InputStream readStream)
Allow to set the content of the attachment by passing a
InputStream object. |
void |
setName(String name)
Allow to set the system name of the attachment
|
getId, getModule, getNativeObject, getPath, savegetURIgetProtocolURI, getProtocolURIString getName()
void setName(String name)
name - The name to setString getShortName()
Date getCreatedDate()
Date getModifiedDate()
long getSize()
void setContent(File file)
File object.file - The file objectvoid setContent(InputStream readStream)
InputStream object.readStream - The input stream.void setContent(byte[] content)
content - The array of bytes.void getContent(File file)
file - The file object to write to.void getContent(OutputStream outputStream)
outputStream - The output stream to write to.byte[] getContent()
InputStream getInputStream() throws IOException
IOExceptionOutputStream getOutputStream() throws IOException
IOExceptionCopyright © 2021 Visiativ Software. All rights reserved.