com.r3corda.core.node.services.testing / MockAttachmentStorage / openAttachment

# openAttachment

`fun openAttachment(id: SecureHash): Attachment?`
Overrides AttachmentStorage.openAttachment

Returns a newly opened stream for the given locally stored attachment, or null if no such attachment is known. The returned stream must be closed when you are done with it to avoid resource leaks. You should probably wrap the result in a JarInputStream unless youre sending it somewhere, there is a convenience helper for this on Attachment.