private static Manifest loadLinkedManifest(File archive) throws IOException { // resolve the .hpl file to the location of the manifest file try { // Locate the manifest String firstLine; try (InputStream manifestHeaderInput = Files.newInputStream(archive.toPath())) { firstLine = IOUtils.readFirstLine(manifestHeaderInput, "UTF-8"); } catch (InvalidPathException e) { throw new IOException(e); } if (firstLine.startsWith("Manifest-Version:")) { // this is the manifest already } else { // indirection archive = resolve(archive, firstLine); } // Read the manifest try (InputStream manifestInput = Files.newInputStream(archive.toPath())) { return new Manifest(manifestInput); } catch (InvalidPathException e) { throw new IOException(e); } } catch (IOException e) { throw new IOException("Failed to load " + archive, e); } }
"crumbIssuer/api/xml?xpath=concat(//crumbRequestField,\":\",//crumb)'")); if (auth != null) con.setRequestProperty("Authorization", auth); String line = IOUtils.readFirstLine(con.getInputStream(),"UTF-8"); String[] components = line.split(":"); if (components.length == 2) {
private static Manifest loadLinkedManifest(File archive) throws IOException { // resolve the .hpl file to the location of the manifest file try { // Locate the manifest String firstLine; try (InputStream manifestHeaderInput = Files.newInputStream(archive.toPath())) { firstLine = IOUtils.readFirstLine(manifestHeaderInput, "UTF-8"); } catch (InvalidPathException e) { throw new IOException(e); } if (firstLine.startsWith("Manifest-Version:")) { // this is the manifest already } else { // indirection archive = resolve(archive, firstLine); } // Read the manifest try (InputStream manifestInput = Files.newInputStream(archive.toPath())) { return new Manifest(manifestInput); } catch (InvalidPathException e) { throw new IOException(e); } } catch (IOException e) { throw new IOException("Failed to load " + archive, e); } }
"crumbIssuer/api/xml?xpath=concat(//crumbRequestField,\":\",//crumb)'")); if (auth != null) con.setRequestProperty("Authorization", auth); String line = IOUtils.readFirstLine(con.getInputStream(),"UTF-8"); String[] components = line.split(":"); if (components.length == 2) {