Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.io.InputStream;
- import java.io.FileInputStream;
- public class Wget
- {
- public static void main(String[] args)
- {
- int contador = 0;
- if(args[0].contains("-f"))
- {
- try
- {
- InputStream objReader = new FileInputStream (args[1]);
- int lectura;
- String direcciones = "";
- while ((lectura = objReader.read()) != -1)
- {
- direcciones += (char)lectura;
- if(lectura == 13)
- contador ++;
- }
- String Dir[] = direcciones.split("\n");
- for (int i = 0; i < Dir.length; i++)
- {
- Fil f = new Fil(Dir[i], contador, args);
- f.start();
- }
- }
- catch(Exception e)
- {
- System.out.println (e);
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement