Package org.apache.sling.distribution.journal

## Interface BinaryStore

    @ProviderType
    public interface BinaryStore

Abstraction for storing binaries

### Method Summary

All Methods Instance Methods Abstract Methods
`InputStream` `get​(String reference)` Return an input stream for the identifier
`String` `put​(String id, InputStream stream, long length)` Return the reference for the binary in the binary store
`String` `put​(String id, InputStream stream, long length, String contentType, Map<String,​String> metadata)` Return the reference for the binary in the binary store.
`boolean` `verify​(String reference)` Verifies that the given reference belongs to this BinaryStore.

### Method Detail

#### get

    InputStream get​(String reference)
             throws IOException

Return an input stream for the identifier

Parameters:
  `reference` - binary reference
Returns:
Throws:
  `IOException`

#### put

    String put​(String id,
               InputStream stream,
               long length)
        throws IOException

Return the reference for the binary in the binary store

Parameters:
  `id` - binary identifier
  `stream` - stream to store
  `length` - length of the stream
Returns:
Throws:
  `IOException`

#### verify

    boolean verify​(String reference)

Verifies that the given reference belongs to this BinaryStore.

Parameters:
  `reference` -
Returns:

#### put

    String put​(String id,
               InputStream stream,
               long length,
               String contentType,
               Map<String,​String> metadata)
        throws IOException

Return the reference for the binary in the binary store.

Parameters:
  `id` - binary identifier
  `stream` - stream to store
  `length` - length of the stream
  `contentType` - the content type of the stream
  `metadata` - a map of metadata to assign to the blog
Returns:
Throws:
  `IOException`