@Override protected void typedParse( final RandomAccessInputStream stream, final Metadata meta, final SCIFIOConfig config) throws IOException, FormatException { final String baseId = ZipUtilities.unzipId(locationService, stream, meta.getMappedFiles()); final io.scif.Parser p = formatService.getFormat(baseId, config).createParser(); final io.scif.Metadata m = p.parse(baseId, config); meta.setMetadata(m); }
@Override public void setSource(final RandomAccessInputStream stream, final SCIFIOConfig config) throws IOException { super.setSource(ZipUtilities.getRawStream(locationService, stream), config); if (reader != null) reader.close(); final String baseId = ZipUtilities.unzipId(locationService, stream, null); try { reader = formatService.getFormat(baseId, config).createReader(); reader.setSource(baseId, config); } catch (final FormatException e) { log().error("Failed to set delegate Reader's source", e); } }