|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object tribble.io.UrlTyper
public class UrlTyper
Simple URL reader.
Opens and reads the contents of a given URL address, displaying the contents to the standard output.
Field Summary | |
---|---|
static int |
BUF_SIZE
Data byte buffer size (in bytes). |
(package private) static java.lang.String |
COPYRIGHT
Embedded copyright notice. |
(package private) static java.lang.String |
REV
Revision information. |
Method Summary | |
---|---|
static long |
copy(java.net.URL url,
java.io.OutputStream out)
Opens a given URL address and reads its contents, copying them to an output stream. |
static void |
main(java.lang.String[] args)
Runs this program. |
protected static void |
run(java.lang.String[] args)
Runs this class as a program. |
protected static void |
usage()
Displays a usage message for this program, then punts. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
static final java.lang.String REV
static final java.lang.String COPYRIGHT
public static final int BUF_SIZE
Method Detail |
---|
public static void main(java.lang.String[] args)
args
- The command line arguments.public static long copy(java.net.URL url, java.io.OutputStream out) throws java.io.IOException
url
- The URL to open and read.out
- The output stream to write to.
java.io.IOException
- Thrown if a read or write error occurs.protected static void run(java.lang.String[] args)
protected static void usage()
This does not return, but calls System.exit(int)
.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |