use of org.apache.poi.poifs.filesystem.DocumentInputStream in project poi by apache.
the class TestWriteWellKnown method getDocumentSummaryInformation.
static DocumentSummaryInformation getDocumentSummaryInformation(NPOIFSFileSystem poifs) throws IOException, NoPropertySetStreamException, UnexpectedPropertySetTypeException, MarkUnsupportedException {
if (!poifs.getRoot().hasEntry(DocumentSummaryInformation.DEFAULT_STREAM_NAME)) {
return null;
}
DocumentInputStream dis = poifs.createDocumentInputStream(DocumentSummaryInformation.DEFAULT_STREAM_NAME);
PropertySet ps = new PropertySet(dis);
DocumentSummaryInformation dsi = new DocumentSummaryInformation(ps);
dis.close();
return dsi;
}
use of org.apache.poi.poifs.filesystem.DocumentInputStream in project poi by apache.
the class BinaryRC4Decryptor method getDataStream.
@Override
@SuppressWarnings("resource")
public ChunkedCipherInputStream getDataStream(DirectoryNode dir) throws IOException, GeneralSecurityException {
DocumentInputStream dis = dir.createDocumentInputStream(DEFAULT_POIFS_ENTRY);
length = dis.readLong();
return new BinaryRC4CipherInputStream(dis, length);
}
Aggregations