net.corda.flows

## Class FetchAttachmentsFlow

- FlowLogic
- - FetchDataFlow
  - - net.corda.flows.FetchAttachmentsFlow

-     public class FetchAttachmentsFlow
      extends FetchDataFlow

  Given a set of hashes either loads from from local storage or requests them from the other peer. Downloaded attachments are saved to local storage automatically.

- - ### Nested Class Summary

    - ### Nested classes/interfaces inherited from class net.corda.flows.FetchDataFlow

      `FetchDataFlow.Request, FetchDataFlow.Result<T extends NamedByHash>`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `FetchAttachmentsFlow(java.util.Set<? extends net.corda.core.crypto.SecureHash> requests, Party otherSide)` Given a set of hashes either loads from from local storage or requests them from the other peer. Downloaded attachments are saved to local storage automatically.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `Attachment` | `convert(byte[] wire)`
    `Attachment` | `load(SecureHash txid)`
    `void` | `maybeWriteToDisk(java.util.List<? extends net.corda.core.contracts.Attachment> downloaded)`

    - ### Methods inherited from class net.corda.flows.FetchDataFlow

      `call, convert, getOtherSide, getRequests, load, maybeWriteToDisk`

    - ### Methods inherited from class net.corda.core.flows.FlowLogic

      `call, getCounterpartyMarker, getLogger, getProgressTracker, getRunId, getServiceHub, getStateMachine, receive, send, sendAndReceive, setStateMachine, subFlow, subFlow, track, waitForLedgerCommit`

- - ### Constructor Detail

    - #### FetchAttachmentsFlow

          public FetchAttachmentsFlow(java.util.Set<? extends net.corda.core.crypto.SecureHash> requests,
                                      Party otherSide)

      Given a set of hashes either loads from from local storage or requests them from the other peer. Downloaded attachments are saved to local storage automatically.

  - ### Method Detail

    - #### load

          public Attachment load(SecureHash txid)

    - #### convert

          public Attachment convert(byte[] wire)

    - #### maybeWriteToDisk

          public void maybeWriteToDisk(java.util.List<? extends net.corda.core.contracts.Attachment> downloaded)