code: public void viewDocument(DocumentEntry entry)
     {
        InputStream is = null;
  
        try
        {
           is = new DocumentInputStream(entry);
           byte[] data = new byte[is.available()];
           is.read(data);
           m_model.setData(data);
           updateTables();
        }
  
        catch (IOException ex)
        {
           throw new RuntimeException(ex);
        }
  
        finally
        {
           StreamHelper.closeQuietly(is);
        }
  
     }
docs: Command to select a document from the POIFS for viewing.
  
  @param entry document to view