Home  >  Core Java

Example of InflaterInputStream in Java

By Arvind Rai, April 16, 2013
In java, InflaterInputStream reads the data of deflate format. InflaterInputStream belongs to the package java.util.zip. InflaterInputStream uncompresses the data of deflate format and provides input stream. Find the example of InflaterInputStream.
InflaterInputStreamTest
package com.concretepage;
import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.IOException;
import java.util.zip.InflaterInputStream;
public class InflaterInputStreamTest {
    public static void main(String[] args) throws IOException {
        FileInputStream fin = new FileInputStream("D:\\page\\tsetfile.dfl");
        FileOutputStream fout = new FileOutputStream("D:\\page\\file.txt");
        InflaterInputStream infis = new InflaterInputStream(fin);
        int c = 0;
        while ((c = infis.read()) != -1) {
            fout.write(c);
        }
        infis.close();
        fout.close();
    }
}
POSTED BY
ARVIND RAI
ARVIND RAI
FIND MORE TUTORILAS






©2019 concretepage.com | Privacy Policy | Contact Us