public class ShaCache
extends java.lang.Object
| Constructor and Description |
|---|
ShaCache(java.io.File root)
Create a SHA-1 cache on a directory.
|
| Modifier and Type | Method and Description |
|---|---|
java.io.File |
getFile(java.lang.String sha,
ShaSource... sources)
Small variation on the cache that returns a file instead of a stream
|
java.io.File |
getRoot()
Get the root to the cache
|
java.io.InputStream |
getStream(java.lang.String sha,
ShaSource... sources)
Return a stream that is associated with a SHA.
|
void |
purge()
Clean the cache
|
public ShaCache(java.io.File root)
root - the directorypublic java.io.InputStream getStream(java.lang.String sha,
ShaSource... sources)
throws java.lang.Exception
sha - the shasources - objects that can retrieve the original datajava.lang.Exceptionpublic java.io.File getFile(java.lang.String sha,
ShaSource... sources)
throws java.lang.Exception
sha - the SHA-1sources - the inputsjava.lang.Exceptionpublic void purge()
throws java.lang.Exception
java.lang.Exceptionpublic java.io.File getRoot()
Copyright (c) aQute SARL (2000, 2017) and others. All Rights Reserved.