Package xal.extension.logbook
Class Attachment
java.lang.Object
xal.extension.logbook.Attachment
- Direct Known Subclasses:
OlogAttachment
This class supports different types of attachments: File, InputStream, and
WritableImage objects.
- Author:
- Juan F. Esteban Müller <JuanF.EstebanMuller@ess.eu>
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected
Empty constructor to be used only by subclasses.Attachment
(File file) Creates a new Attachment instance from a File object.Attachment
(String fileName, InputStream fileContent) Creates a new Attachment from an InputStream. -
Method Summary
Modifier and TypeMethodDescriptionvoid
setContent
(ByteArrayOutputStream byteOutput) void
setFileName
(String fileName) void
setMimeType
(String mimeType)
-
Constructor Details
-
Attachment
protected Attachment()Empty constructor to be used only by subclasses. -
Attachment
Creates a new Attachment instance from a File object.- Parameters:
file
-- Throws:
IOException
-
Attachment
Creates a new Attachment from an InputStream.- Parameters:
fileName
- Filename, including extension.fileContent
- An InputStream object. If it is an image, it will recognize it.
-
-
Method Details
-
getMimeType
-
setMimeType
-
getFileName
-
setFileName
-
getContent
-
setContent
-