public class LazyBinary extends Binary
The methods cache()
, #fetchFile
and #fetchLength
must be implemented
by the concrete class.
Constructor and Description |
---|
LazyBinary(String digest,
BinaryFileCache cache,
String repo)
A lazy binary for the given digest.
|
Modifier and Type | Method and Description |
---|---|
long |
getLength()
Gets the length of the binary.
|
InputStream |
getStream()
Gets an input stream for the binary.
|
StreamSource |
getStreamSource() |
public LazyBinary(String digest, BinaryFileCache cache, String repo)
digest
- the digest for the binaryfileCache()
- a file cache used by the length-caching methodspublic InputStream getStream() throws IOException
Binary
getStream
in class Binary
IOException
public StreamSource getStreamSource()
getStreamSource
in class Binary
Copyright © 2013 Nuxeo SA. All Rights Reserved.