public class SavedHttpAttachment extends Attachment
Attachment.Encoding
encoding, name, type
Constructor and Description |
---|
SavedHttpAttachment(java.lang.String name,
java.util.Map<java.lang.String,java.lang.Object> attachmentData,
java.net.URI attachmentURI)
Creates a SavedHttpAttachment (a fully initialised attachment)
with the provided properties
|
Modifier and Type | Method and Description |
---|---|
java.io.InputStream |
getInputStream()
Gets contents of attachments as a stream.
|
compareTo, getEncodingFromString, toString
public SavedHttpAttachment(java.lang.String name, java.util.Map<java.lang.String,java.lang.Object> attachmentData, java.net.URI attachmentURI) throws java.io.IOException
name
- The name of the attachment eg bonsai-boston.jpgattachmentData
- The json attachment data from a couchDB instanceattachmentURI
- The URI at which the attachment can be downloadedjava.io.IOException
- if there is an error decoding the attachment datapublic java.io.InputStream getInputStream() throws java.io.IOException
Attachment
getInputStream
in class Attachment
java.io.IOException
- there was an error obtaining the stream, eg from disk or network