# StreamCopier (sshj 0.4.0 API)
Date: 2011-06-06

## net.schmizz.sshj.common
Class StreamCopier

    java.lang.Object
      net.schmizz.sshj.common.StreamCopier

    public class StreamCopier

extends Object

Nested Class Summary
`static interface` `StreamCopier.Listener`

Constructor Summary
`StreamCopier(InputStream in, OutputStream out)`

Method Summary
`StreamCopier` `bufSize(int bufSize)`
`long` `copy()`
`StreamCopier` `keepFlushing(boolean keepFlushing)`
`StreamCopier` `length(long length)`
`StreamCopier` `listener(StreamCopier.Listener listener)`
`Event<IOException>` `spawn(String name)`
`Event<IOException>` `spawnDaemon(String name)`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### StreamCopier

    public StreamCopier(InputStream in,
                        OutputStream out)

Method Detail

### bufSize

    public StreamCopier bufSize(int bufSize)

### keepFlushing

    public StreamCopier keepFlushing(boolean keepFlushing)

### listener

    public StreamCopier listener(StreamCopier.Listener listener)

### length

    public StreamCopier length(long length)

### spawn

    public Event<IOException> spawn(String name)

### spawnDaemon

    public Event<IOException> spawnDaemon(String name)

### copy

    public long copy()
              throws IOException

  Throws:
    `IOException`

Copyright © 2009-2011. All Rights Reserved.