public class ShaCache extends Object
| Constructor and Description |
|---|
ShaCache(File root)
Create a SHA-1 cache on a directory.
|
| Modifier and Type | Method and Description |
|---|---|
File |
getFile(String sha,
ShaSource... sources)
Small variation on the cache that returns a file instead of a stream
|
File |
getRoot()
Get the root to the cache
|
InputStream |
getStream(String sha,
ShaSource... sources)
Return a stream that is associated with a SHA.
|
void |
purge()
Clean the cache
|
public ShaCache(File root)
root - the directorypublic InputStream getStream(String sha, ShaSource... sources) throws Exception
sha - the shasources - objects that can retrieve the original dataExceptionpublic File getFile(String sha, ShaSource... sources) throws Exception
sha - the SHA-1sources - the inputsExceptionpublic File getRoot()
Copyright © 2019 aQute SARL. All rights reserved.