Created
August 16, 2012 18:18
-
-
Save andresrc/3372343 to your computer and use it in GitHub Desktop.
Bocas Interface
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public interface Bocas { | |
/* | |
* Checking if the repository contains entries. | |
*/ | |
boolean contains(ByteString key); | |
Set<ByteString> contained(Iterable<ByteString> keys); | |
/* | |
* Obtaining entries. | |
*/ | |
Optional<BocasValue> get(ByteString key); | |
Map<ByteString, BocasValue> get(Iterable<ByteString> keys); | |
/* | |
* Adding entries to the repository. | |
*/ | |
ByteString put(InputSupplier<? extends InputStream> object); | |
ByteString put(InputStream object); | |
List<ByteString> putSuppliers(List<? extends InputSupplier<? extends InputStream>> objects); | |
List<ByteString> putStreams(List<? extends InputStream> objects); | |
/* Adding a set of entries to the repository, contained in a ZIP file. */ | |
Map<String, ByteString> putZip(InputStream object); | |
Map<String, ByteString> putZip(InputSupplier<? extends InputStream> object); | |
/* Adding a set of entries to the repository, contained in a ZIP file, compressing them with GZip. */ | |
Map<String, MaybeCompressed<ByteString>> putZipAndGZip(InputStream object); | |
Map<String, MaybeCompressed<ByteString>> putZipAndGZip(InputSupplier<? extends InputStream> object); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment