Class CopyThread

  extended by java.lang.Thread
      extended by ch.claudio.lib.CopyThread
All Implemented Interfaces:

public class CopyThread
extends java.lang.Thread

This thread copies data between and inut and output stream.

Claudio Nieder

Copyright (C) 2007 Claudio Nieder <>, CH-8610 Uster

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 of the License.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA

Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Thread
java.lang.Thread.State, java.lang.Thread.UncaughtExceptionHandler
Field Summary
Fields inherited from class java.lang.Thread
Constructor Summary
CopyThread( inArg, outArg)
          Create a new copying thread using a default buffer size.
CopyThread( inArg, outArg, int bufferSizeArg)
          Create a new copying thread.
Method Summary
static void main(java.lang.String[] args)
          Print license.
 void run()
Methods inherited from class java.lang.Thread
activeCount, checkAccess, countStackFrames, currentThread, destroy, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, stop, suspend, toString, yield
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail


public CopyThread( inArg,
                  int bufferSizeArg)
Create a new copying thread. The data is read into a buffer and written out of it. The third argument defines the size of this buffer. You need to start it explicitly.

inArg -
outArg -
bufferSizeArg -


public CopyThread( inArg,
Create a new copying thread using a default buffer size. You need to start it explicitly.

inArg - source
outArg - destination
Method Detail


public void run()
Specified by:
run in interface java.lang.Runnable
run in class java.lang.Thread
See Also:


public static void main(java.lang.String[] args)
Print license.

args - ignored