question: public final void openPdfFileFromStream ( final Object filename , final String password ) throws PdfException { closeOnExit = false ; if ( filename instanceof ImageInputStream ) { final ImageInputStream iis = ( ImageInputStream ) filename ; if ( isOpen ) { closePdfFile ( ) ; } isOpen = false ; this . filename = "ImageInputStream" + System . currentTimeMillis ( ) ; org . jpedal . DevFlags . currentFile = this . filename ; res . flush ( ) ; res . flushObjects ( ) ; objectStoreRef . storeFileName ( this . filename ) ; currentPdfFile = new PdfObjectReader ( password ) ; currentPdfFile . openPdfFile ( iis ) ; openPdfFile ( ) ; } else { throw new RuntimeException ( filename + " not currently an option" ) ; } }
target:  routine to open PDF file and extract key info from pdf file so we can decode any pages which also sets password. Does not actually decode the pages themselves. Also reads the form data. You must explicitly close your stream!!