public class DocumentFactoryHelper
extends java.lang.Object
Constructor and Description |
---|
DocumentFactoryHelper() |
Modifier and Type | Method and Description |
---|---|
static java.io.InputStream |
getDecryptedStream(NPOIFSFileSystem fs,
java.lang.String password)
Wrap the OLE2 data in the NPOIFSFileSystem into a decrypted stream by using
the given password.
|
static boolean |
hasOOXMLHeader(java.io.InputStream inp)
Checks that the supplied InputStream (which MUST
support mark and reset, or be a PushbackInputStream)
has a OOXML (zip) header at the start of it.
|
public static java.io.InputStream getDecryptedStream(NPOIFSFileSystem fs, java.lang.String password) throws java.io.IOException
fs
- The OLE2 stream for the documentpassword
- The password, null if the default password should be usedjava.io.IOException
- If an error occurs while decrypting or if the password does not matchpublic static boolean hasOOXMLHeader(java.io.InputStream inp) throws java.io.IOException
inp
- An InputStream which supports either mark/reset, or is a PushbackInputStreamjava.io.IOException
Copyright 2018 The Apache Software Foundation or its licensors, as applicable.