public class AttachmentFileTO extends AttachmentTO
AttachmentFileTO will be based on a file. The stream to the file will be opened and
closed during the AttachmentTO.write(File) methods.| Constructor and Description |
|---|
AttachmentFileTO(File file) |
AttachmentFileTO(File file,
AttachmentStatus status) |
| Modifier and Type | Method and Description |
|---|---|
File |
getFile() |
InputStream |
open()
Open the inputstream
|
close, getContentLength, getMetadata, getNoteId, getProperties, getStatus, getUploadDate, getUploaderId, sendInResponse, setContentLength, setMetadata, setNoteId, setProperties, setStatus, setUploadDate, setUploaderId, setVirusScanner, toString, write, write, write, writecopypublic AttachmentFileTO(File file) throws IOException
file - the file the attachment will be based on. A check will be done if the file exists.IOException - in case of an io errorpublic AttachmentFileTO(File file, AttachmentStatus status) throws IOException
file - the file the attachment will be based on. A check will be done if the file exists.status - the status to setIOException - in case of an io errorpublic File getFile()
public InputStream open() throws FileNotFoundException
open in class AttachmentTOFileNotFoundExceptionCopyright © 2019 Communote team. All rights reserved.