T
thanh toan
I can download the zip file, but can't extract it with jar. The zip size is
correct. Thank you.
import java.net.*;
import java.io.*;
public class downloadZip
{
public static void main(String args[]) throws Exception
{
URL yh = new URL("the url of the zip file");
InputStreamReader in = new InputStreamReader( yh.openStream());
FileWriter out = new FileWriter("the name of the zip file");
int m;
while( (m= in.read()) != -1 )
{
out.write(m);
}
in.close();
out.close();
}
}
correct. Thank you.
import java.net.*;
import java.io.*;
public class downloadZip
{
public static void main(String args[]) throws Exception
{
URL yh = new URL("the url of the zip file");
InputStreamReader in = new InputStreamReader( yh.openStream());
FileWriter out = new FileWriter("the name of the zip file");
int m;
while( (m= in.read()) != -1 )
{
out.write(m);
}
in.close();
out.close();
}
}