From 51209bc957305808009e82ad075c9375802b094b Mon Sep 17 00:00:00 2001
From: Nick Burch
Note that in order to properly release resources the * Workbook should be closed after use. + * @throws EncryptedDocumentException If the workbook given is password protected */ - public static Workbook create(InputStream inp) throws IOException, InvalidFormatException { + public static Workbook create(InputStream inp) throws IOException, InvalidFormatException, EncryptedDocumentException { // If clearly doesn't do mark/reset, wrap up if (! inp.markSupported()) { inp = new PushbackInputStream(inp, 8); @@ -94,8 +96,9 @@ public class WorkbookFactory { * the given File, which must exist and be readable. *
Note that in order to properly release resources the * Workbook should be closed after use. + * @throws EncryptedDocumentException If the workbook given is password protected */ - public static Workbook create(File file) throws IOException, InvalidFormatException { + public static Workbook create(File file) throws IOException, InvalidFormatException, EncryptedDocumentException { if (! file.exists()) { throw new FileNotFoundException(file.toString()); } -- 2.39.5