Initial revision
From-SVN: r102074
This commit is contained in:
parent
6f4434b39b
commit
f911ba985a
4557 changed files with 1000262 additions and 0 deletions
23
libjava/classpath/testsuite/java.net/URLTest.java
Normal file
23
libjava/classpath/testsuite/java.net/URLTest.java
Normal file
|
@ -0,0 +1,23 @@
|
|||
import java.net.*;
|
||||
import java.io.*;
|
||||
|
||||
public class URLTest
|
||||
{
|
||||
public static void main(String args[])
|
||||
{
|
||||
try {
|
||||
URL url = new URL("http://www.hungry.com/");
|
||||
InputStream stream = url.openStream();
|
||||
|
||||
int size = 0;
|
||||
|
||||
while (-1 != stream.read()) { size++; }
|
||||
|
||||
stream.close();
|
||||
|
||||
System.out.println("PASSED: new URL() size=" + size );
|
||||
} catch (Exception e) {
|
||||
System.out.println("FAILED: " + e);
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue