public InputStream getInstance ( DirectoryEntry directory , String name ) throws IOException { DocumentEntry entry = ( DocumentEntry ) directory . getEntry ( name ) ; InputStream stream ; if ( m_encrypted ) { stream = new EncryptedDocumentInputStream ( entry , m_encryptionCode ) ; } else { stream = new DocumentInputStream ( entry ) ; } return stream ; }
Method used to instantiate the appropriate input stream reader a standard one or one which can deal with encrypted data .