return null;
return p.getLength();
}
public String getDigest() {
ContentPointer contentPointer = getContentPointer();
if (contentPointer instanceof ContentSHA) {
return ((ContentSHA) contentPointer).getDigest();
}
if (contentPointer instanceof InlineContent) {
try {
return DigestUtils.shaHex(((InlineContent) contentPointer)
.getInputStream());
} catch (IOException e) {
throw new RuntimeException(e);
}
}
if (contentPointer.getLength() == 0)
return ContentSHA.calculate(ArrayUtils.EMPTY_BYTE_ARRAY)
.getDigest();
// TODO:
System.err.println("NO DIGEST!");