#1
  1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Sep 2013
    Posts
    1
    Rep Power
    0

    Need Help In Fixing The Code


    Hi below is the code which is not working on my eclipse can some one help me in fixing that pls....



    import javax.swing.*;
    import java.awt.*;
    import java.applet.Applet.*;
    import javax.swing.table.*;
    import java.awt.event.*;
    import javax.swing.event.*;
    import java.io.*;
    import java.util.*;
    import java.util.zip.*;

    public class call1
    {
    public static void main(String st[])throws IOException
    {
    try
    {
    Compress1 c=new Compress1();
    c.decompress("y.cmp","z.java");
    }catch(Exception e)
    {}
    }
    }
    class Compress1
    {
    void decompress(String srcfile, String dstfile) throws Exception {
    BufferedInputStream fin=new BufferedInputStream(
    new GZIPInputStream(
    new FileInputStream(srcfile)));

    BufferedOutputStream fout=new BufferedOutputStream(
    new FileOutputStream(dstfile));

    int b;
    while((b=fin.read())!=-1)
    fout.write(b);

    fin.close();
    fout.close();
    }
    }
  2. #2
  3. Contributing User
    Devshed Expert (3500 - 3999 posts)

    Join Date
    Aug 2010
    Location
    Eastern Florida
    Posts
    3,711
    Rep Power
    348
    code which is not working
    Can you give us some details on what "not working" means?
    Please copy the full text of any error messages and paste them here.

    Also edit your post and wrap the code in code tags:
    [code]
    >>>>THE CODE HERE<<<<<<<
    [/code]

IMN logo majestic logo threadwatch logo seochat tools logo