net.sf.commons.ssh.utils
Class AutoflushPipeOutputStream

java.lang.Object
  extended by java.io.OutputStream
      extended by java.io.PipedOutputStream
          extended by net.sf.commons.ssh.utils.AutoflushPipeOutputStream
All Implemented Interfaces:
java.io.Closeable, java.io.Flushable

public final class AutoflushPipeOutputStream
extends java.io.PipedOutputStream

Since:
1.3
Author:
Sergey Vladimirov (vlsergey at gmail dot com)

Constructor Summary
AutoflushPipeOutputStream()
          Creates a piped output stream that is not yet connected to a piped input stream.
AutoflushPipeOutputStream(java.io.PipedInputStream snk)
          Creates a piped output stream connected to the specified piped input stream.
 
Method Summary
 void write(byte[] b, int off, int len)
           
 
Methods inherited from class java.io.PipedOutputStream
close, connect, flush, write
 
Methods inherited from class java.io.OutputStream
write
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AutoflushPipeOutputStream

public AutoflushPipeOutputStream()
Creates a piped output stream that is not yet connected to a piped input stream. It must be connected to a piped input stream, either by the receiver or the sender, before being used.


AutoflushPipeOutputStream

public AutoflushPipeOutputStream(java.io.PipedInputStream snk)
                          throws java.io.IOException
Creates a piped output stream connected to the specified piped input stream. Data bytes written to this stream will then be available as input from snk.

Parameters:
snk - The piped input stream to connect to.
Throws:
java.io.IOException - if an I/O error occurs.
Method Detail

write

public void write(byte[] b,
                  int off,
                  int len)
           throws java.io.IOException
Overrides:
write in class java.io.PipedOutputStream
Throws:
java.io.IOException


Copyright © 2009. All Rights Reserved.