Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 16 Aug 2002 08:49:24 -0700
From:      Branden Root <branden@portentinteractive.com>
To:        freebsd-java@freebsd.org
Subject:   re: hanging threads in IDEA
Message-ID:  <200208160849.24173.branden@portentinteractive.com>

next in thread | raw e-mail | index | archive | help

	What's funny is my class doesn't actually use threads. I just wrote it as a 
sample test for IDEA's features. Here's the code:

package utils;

import java.net.*;
import java.io.*;


public class GetURL {
    private static String location = "http://www.yahoo.com";
    public static void main(String[] argv) {
        try {
            URL newUrl = new URL(location);
            BufferedReader bin = new BufferedReader(new 
InputStreamReader(newUrl.openStream()));
            String output;
            while ((output = bin.readLine()) != null) {
                System.out.println(output);
            }
            bin.close();
        }
        catch (Exception e) {
            System.out.println("Error:" + e);
        }
    }
}


Nothing fancy...
-- 
Branden Root
Web Developer
Portent Interactive


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-java" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200208160849.24173.branden>