File Input Output Java

import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.InputStream;
import java.util.jar.JarOutputStream;
import java.util.jar.Pack200;
import java.util.zip.GZIPInputStream;
public class Main {
  public static void main(String[] args) throws Exception {
    String inName = "a.pack.gz";
    String outName = "a.unpacked";
    Pack200.Unpacker unpacker = Pack200.newUnpacker();
    JarOutputStream out = new JarOutputStream(new FileOutputStream(outName));
    InputStream in = new FileInputStream(inName);
    in = new GZIPInputStream(in);
    unpacker.unpack(in, out);
    out.close();
  }
}