Class AttachmentHandlingHelper
java.lang.Object
com.levigo.jadice.web.server.util.AttachmentHandlingHelper
The
AttachmentHandlingHelper class provides utilities to extract and handle attachments
embedded in documents, given an input stream and a URI source. It supports extracting the attachment
stream, determining the attachment name from a URI, and accessing document attachment metadata.
This class is primarily responsible for extracting embedded file attachments from documents, based on the URI provided in the source. It includes logic to read the document, locate the attachment, and return the corresponding stream if the attachment is found.
Example usage:
AttachmentHandlingHelper helper = new AttachmentHandlingHelper();
SeekableInputStream attachmentStream = helper.getAttachmentStream(inputStream, uriSource);
This class is thread-safe as all critical methods are synchronized.
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncom.levigo.jadice.document.io.SeekableInputStreamgetAttachmentStream(InputStream documentStream, UriHandle handle) com.levigo.jadice.document.io.SeekableInputStreamgetAttachmentStream(InputStream documentStream, UriSource source) getAttachmentValue(String url)
-
Constructor Details
-
AttachmentHandlingHelper
public AttachmentHandlingHelper()
-
-
Method Details
-
getAttachmentValue
- Throws:
URISyntaxException