public class Digests extends Object
| Constructor and Description |
|---|
Digests() |
| Modifier and Type | Method and Description |
|---|---|
static BlobDescriptor |
computeDigest(InputStream inStream) |
static BlobDescriptor |
computeDigest(InputStream inStream,
OutputStream outStream)
Computes the digest by consuming the contents of an
InputStream while copying it to an
OutputStream. |
static BlobDescriptor |
computeDigest(JsonTemplate template) |
static BlobDescriptor |
computeDigest(JsonTemplate template,
OutputStream outStream) |
static BlobDescriptor |
computeDigest(WritableContents contents)
Computes the digest by consuming the contents.
|
static BlobDescriptor |
computeDigest(WritableContents contents,
OutputStream outStream)
Computes the digest by consuming the contents while copying it to an
OutputStream. |
static DescriptorDigest |
computeJsonDigest(JsonTemplate template) |
static DescriptorDigest |
computeJsonDigest(List<? extends JsonTemplate> templates) |
public static DescriptorDigest computeJsonDigest(JsonTemplate template) throws IOException
IOExceptionpublic static DescriptorDigest computeJsonDigest(List<? extends JsonTemplate> templates) throws IOException
IOExceptionpublic static BlobDescriptor computeDigest(JsonTemplate template) throws IOException
IOExceptionpublic static BlobDescriptor computeDigest(JsonTemplate template, OutputStream outStream) throws IOException
IOExceptionpublic static BlobDescriptor computeDigest(InputStream inStream) throws IOException
IOExceptionpublic static BlobDescriptor computeDigest(WritableContents contents) throws IOException
contents - the contents for which the digest is computedIOException - if reading failspublic static BlobDescriptor computeDigest(InputStream inStream, OutputStream outStream) throws IOException
InputStream while copying it to an
OutputStream. Returns the computed digest along with the size of the bytes consumed to
compute the digest. Does not close either stream.inStream - the stream to read the contents fromoutStream - the stream to which the contents are copiedIOException - if reading from or writing failspublic static BlobDescriptor computeDigest(WritableContents contents, OutputStream outStream) throws IOException
OutputStream.
Returns the computed digest along with the size of the bytes consumed to compute the digest.
Does not close the stream.contents - the contents to compute digest foroutStream - the stream to which the contents are copiedIOException - if reading from or writing failsCopyright © 2019. All rights reserved.