/** * This will parse the stream and populate the COSDocument object. * * @throws IOException If there is an error reading from the stream or corrupt data * is found. */ public void parse() throws IOException { // set to false if all is processed boolean exceptionOccurred = true; try { if (!parseFDFHeader()) { throw new IOException( "Error: Header doesn't contain versioninfo" ); } initialParse(); exceptionOccurred = false; } finally { if (exceptionOccurred && document != null) { IOUtils.closeQuietly(document); document = null; } } } }
/** * This will parse the stream and populate the COSDocument object. * * @throws IOException If there is an error reading from the stream or corrupt data * is found. */ public void parse() throws IOException { // set to false if all is processed boolean exceptionOccurred = true; try { if (!parseFDFHeader()) { throw new IOException( "Error: Header doesn't contain versioninfo" ); } initialParse(); exceptionOccurred = false; } finally { if (exceptionOccurred && document != null) { IOUtils.closeQuietly(document); document = null; } } } }
/** * This will parse the stream and populate the COSDocument object. * * @throws IOException If there is an error reading from the stream or corrupt data * is found. */ public void parse() throws IOException { // set to false if all is processed boolean exceptionOccurred = true; try { if (!parseFDFHeader()) { throw new IOException( "Error: Header doesn't contain versioninfo" ); } initialParse(); exceptionOccurred = false; } finally { if (exceptionOccurred && document != null) { IOUtils.closeQuietly(document); document = null; } } } }