|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objecttribble.io.StreamCopier
public class StreamCopier
Simple stream copying methods.
| Field Summary | |
|---|---|
(package private) static java.lang.String |
COPYRIGHT
Embedded copyright notice. |
static int |
DFL_BUFSZ
Default data copying buffer size (in bytes). |
(package private) static java.lang.String |
REV
Revision information. |
| Method Summary | |
|---|---|
static long |
copy(java.io.InputStream in,
java.io.OutputStream out)
Equivalent to: copy(in, out, DFL_BUFSZ). |
static long |
copy(java.io.InputStream in,
java.io.OutputStream out,
int bufsz)
Copies the contents of an input stream to an output stream. |
static long |
copy(java.io.Reader in,
java.io.Writer out)
Equivalent to: copy(in, out, DFL_BUFSZ). |
static long |
copy(java.io.Reader in,
java.io.Writer out,
int bufsz)
Copies the contents of an input stream to an output stream. |
static void |
main(java.lang.String[] args)
Test driver. |
protected static void |
run(java.lang.String[] args)
Runs this class as a program. |
protected static void |
usage()
Displays a program usage message, 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 DFL_BUFSZ
| Method Detail |
|---|
public static void main(java.lang.String[] args)
args - The command line arguments.
public static long copy(java.io.InputStream in,
java.io.OutputStream out)
throws java.io.IOException
DFL_BUFSZ).
java.io.IOExceptioncopy(InputStream, OutputStream, int)
public static long copy(java.io.InputStream in,
java.io.OutputStream out,
int bufsz)
throws java.io.IOException
in - The input stream, which is assumed to already be open for reading.
This object is synchronized.out - The output stream, which is assumed to already be open for writing.
This object is synchronized.bufsz - The buffer size to use (in bytes).
java.io.IOException - Thrown if a read or write error occurs.copy(InputStream, OutputStream)
public static long copy(java.io.Reader in,
java.io.Writer out)
throws java.io.IOException
DFL_BUFSZ).
java.io.IOExceptioncopy(Reader, Writer, int)
public static long copy(java.io.Reader in,
java.io.Writer out,
int bufsz)
throws java.io.IOException
in - The input stream, which is assumed to already be open for reading.
This object is synchronized.out - The output stream, which is assumed to already be open for writing.
This object is synchronized.bufsz - The buffer size to use (in bytes).
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 | ||||||||