private ZipEntry nextEntry(final ZipInputStream input, final String location) throws IOException { try { return input.getNextEntry(); } catch (final IOException e) { throw analyzerError(location, e); } }
private int analyzeGzip(final InputStream input, final String location) throws IOException { GZIPInputStream gzipInputStream; try { gzipInputStream = new GZIPInputStream(input); } catch (final IOException e) { throw analyzerError(location, e); } return analyzeAll(gzipInputStream, location); }
/** * Analyzes the class definition from a given in-memory buffer. * * @param buffer * class definitions * @param location * a location description used for exception messages * @throws IOException * if the class can't be analyzed */ public void analyzeClass(final byte[] buffer, final String location) throws IOException { try { analyzeClass(buffer); } catch (final RuntimeException cause) { throw analyzerError(location, cause); } }
private int analyzePack200(final InputStream input, final String location) throws IOException { InputStream unpackedInput; try { unpackedInput = Pack200Streams.unpack(input); } catch (final IOException e) { throw analyzerError(location, e); } return analyzeAll(unpackedInput, location); }
/** * Analyzes the class definition from a given input stream. The provided * {@link InputStream} is not closed by this method. * * @param input * stream to read class definition from * @param location * a location description used for exception messages * @throws IOException * if the stream can't be read or the class can't be analyzed */ public void analyzeClass(final InputStream input, final String location) throws IOException { final byte[] buffer; try { buffer = InputStreams.readFully(input); } catch (final IOException e) { throw analyzerError(location, e); } analyzeClass(buffer, location); }
detector = new ContentTypeDetector(input); } catch (final IOException e) { throw analyzerError(location, e);