Package jadex.commons

Class StreamCopy

  • All Implemented Interfaces:
    java.lang.Runnable

    public class StreamCopy
    extends java.lang.Object
    implements java.lang.Runnable
    A runnable to concurrently copy data from one stream to the other.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected java.io.InputStream source
      The source stream.
      protected java.io.OutputStream target
      The target stream.
    • Constructor Summary

      Constructors 
      Constructor Description
      StreamCopy​(java.io.InputStream source, java.io.OutputStream target)
      Create a stream copy object.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void run()
      Copy data from source to target.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • source

        protected java.io.InputStream source
        The source stream.
      • target

        protected java.io.OutputStream target
        The target stream.
    • Constructor Detail

      • StreamCopy

        public StreamCopy​(java.io.InputStream source,
                          java.io.OutputStream target)
        Create a stream copy object.
    • Method Detail

      • run

        public void run()
        Copy data from source to target.
        Specified by:
        run in interface java.lang.Runnable