public class CAFS extends Object implements Closeable, Iterable<SHA1>
Constructor and Description |
---|
CAFS(File home,
boolean create)
Constructor for a Content Addressable File Store
|
Modifier and Type | Method and Description |
---|---|
void |
close() |
boolean |
exists(byte[] sha1) |
boolean |
isEmpty() |
Iterator<SHA1> |
iterator() |
InputStream |
read(SHA1 sha1)
Read the contents of a sha 1 key.
|
void |
reindex() |
SHA1 |
write(InputStream in)
Store an input stream in the CAFS while calculating and returning the
SHA-1 code.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
forEach, spliterator
public SHA1 write(InputStream in) throws Exception
in
- The input stream to store.Exception
- if anything goes wrongpublic InputStream read(SHA1 sha1) throws Exception
sha1
- The keyException
public void close() throws IOException
close
in interface Closeable
close
in interface AutoCloseable
IOException
public boolean isEmpty() throws IOException
IOException
Copyright © 2015 aQute SARL. All rights reserved.