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
ConstructorsModifierConstructorDescriptionprotectedEmpty 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 TypeMethodDescriptionvoidsetContent(ByteArrayOutputStream byteOutput) voidsetFileName(String fileName) voidsetMimeType(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
-