*/
private InputStream getContentStream(Document document,
ContentEncoding documentContentEncoding,
ContentEncoding alternateEncoding) throws RepositoryException {
InputStream contentStream;
InputStream original = new BigEmptyDocumentFilterInputStream(
DocUtils.getOptionalStream(document, SpiConstants.PROPNAME_CONTENT),
fileSizeLimit.maxDocumentSize());
InputStream encodedContentStream;
if (documentContentEncoding == null) {
encodedContentStream = getEncodedStream(contentEncoding,