code: 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;
     }
docs: Method used to instantiate the appropriate input stream reader,
  a standard one, or one which can deal with "encrypted" data.
  
  @param directory directory entry
  @param name file name
  @return new input stream
  @throws IOException