/** * Parses an XML stream to an ACL. * * @param in * the XML stream * @throws IOException * if there is a problem unmarshaling the stream */ private static AccessControlList parseXml(InputStream in) throws IOException, AccessControlParsingException { Unmarshaller unmarshaller; try { unmarshaller = jaxbContext.createUnmarshaller(); return unmarshaller.unmarshal(new StreamSource(in), AccessControlList.class).getValue(); } catch (Exception e) { if (e instanceof IOException) { throw (IOException) e; } else { throw new AccessControlParsingException(e); } } finally { IOUtils.closeQuietly(in); } }
throw new AccessControlParsingException(e);