xmlgraphics-batik-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ma zhenduo" <mazd_w...@yahoo.com>
Subject Re: SVGz
Date Tue, 09 Apr 2002 02:52:23 GMT
Message  public static void main4(String[] args) throws Exception{
    java.io.FileInputStream fis= new FileInputStream("c:\\test.svg");
    java.util.zip.GZIPOutputStream zos= new java.util.zip.GZIPOutputStream(
      new FileOutputStream("c:\\test.svgz")
    );
    int n = -1;
    while( (n=fis.read())!=-1){
      zos.write(n);
    }
    zos.flush();
    zos.close();
  }
so, I think, when print the Document to .svgz, only replease the
FileOuputStream to GZIPOutputStream.
  ----- Original Message -----
  From: S├ębastien Regnoult
  To: batik-users@xml.apache.org
  Sent: Monday, April 08, 2002 4:13 PM
  Subject: SVGz


  Hi,

  sorry if this question has already been answered ;-)

  is there a way for Batik to create .svgz files or do I have to use java io
streams to manage the compression ?

  Thank you for your answer (sample code appreciated)

  S├ębastien Regnoult
  Otake - Montpellier - France
  sebastien.regnoult@otake.fr



Mime
View raw message