org.sourceforge.jxutil.io
Class StreamCopier
java.lang.Object
|
+--org.sourceforge.jxutil.io.StreamCopier
- All Implemented Interfaces:
- Runnable
- public final class StreamCopier
- extends Object
- implements Runnable
Copy a byte stream synchronously or asynchronously to current thread.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
bufSize
private int bufSize
defaultBufSize
public static int defaultBufSize
ex
private IOException ex
inputLength
private final long inputLength
is
private final InputStream is
os
private final OutputStream os
transferred
private long transferred
StreamCopier
public StreamCopier(InputStream is,
long inputLength,
OutputStream os)
StreamCopier
public StreamCopier(InputStream is,
OutputStream os)
check
public final void check()
throws IOException
IOException
copy
public static void copy(InputStream in,
long inputLength,
OutputStream out)
throws IOException
IOException
copy
public static void copy(InputStream in,
OutputStream out)
throws IOException
IOException
copyThread
public static void copyThread(InputStream in,
long inputLength,
OutputStream out)
throws IOException,
InterruptedException
IOException
InterruptedException
copyThread
public static void copyThread(InputStream in,
OutputStream out)
throws IOException,
InterruptedException
IOException
InterruptedException
getBufSize
public final int getBufSize()
getTransferred
public final long getTransferred()
run
public final void run()
- Specified by:
run
in interface Runnable
setBufSize
public final void setBufSize(int bufSize)
Copyright © 2001,2002 Keve Müller, et al.; see LICENSE file for details.