public interface Attachment
Modifier and Type | Interface and Description |
---|---|
static class |
Attachment.Compression
Enum for method of compression.
|
static interface |
Attachment.IDataCallback
Callback class to read the streamed attachment data
|
Modifier and Type | Method and Description |
---|---|
void |
deleteFromDocument()
Deletes an attached file item from a note and also deallocates the disk space
used to store the attached file in the database.
|
void |
extract(Path targetFilePath)
Writes the attachment data to a designated path.
|
Attachment.Compression |
getCompression()
Gets the compression type for the attachment
|
DominoDateTime |
getFileCreated()
Gets the created datetime of the attachment.
|
DominoDateTime |
getFileModified()
Gets the modified datetime of the attachment
|
String |
getFileName()
Gets the filename for the attachment
|
long |
getFileSize()
Gets the filesize of the attachment
|
InputStream |
getInputStream()
Retrieves an input stream to access the data of the attachment.
|
Document |
getParent()
Returns the parent document of this attachment
|
void |
readData(Attachment.IDataCallback callback)
Method to access the binary attachment data
|
void |
readData(Attachment.IDataCallback callback,
int offset)
Method to access the binary attachment data beginning at an offset in the
file.
|
String getFileName()
Attachment.Compression getCompression()
long getFileSize()
DominoDateTime getFileCreated()
DominoDateTime getFileModified()
void readData(Attachment.IDataCallback callback, int offset)
UnsupportedOperationException
.callback
- callback is called with streamed dataoffset
- offset to start readingvoid readData(Attachment.IDataCallback callback)
callback
- callback is called with streamed datavoid deleteFromDocument()
Document getParent()
void extract(Path targetFilePath) throws IOException
Implementation note: using a local filesystem path is more efficient than using a path from an abstracted provider.
targetFilePath
- the file path of the file to writeIOException
- in case of I/O errorsInputStream getInputStream() throws IOException
InputStream
for the attachment dataIOException
- in case of I/O errorsCopyright © 2019–2021 HCL. All rights reserved.