/** * Constructor. * * @param baseExporter exporter whose output is to be compressed */ GzipExporter(GraphicExporter baseExporter) { super( baseExporter.getName() + "-gzip", baseExporter.getMimeType(), appendGzipSuffix(baseExporter.getFileSuffixes())); baseExporter_ = baseExporter; }
public void exportGraphic(Picture picture, OutputStream out) throws IOException { GZIPOutputStream gzout = new GZIPOutputStream(out); baseExporter_.exportGraphic(picture, gzout); gzout.finish(); }