Class AFOutputStream

java.lang.Object
java.io.OutputStream
org.newsclub.net.unix.AFOutputStream
All Implemented Interfaces:
Closeable, Flushable, AutoCloseable, FileDescriptorAccess

public abstract class AFOutputStream extends OutputStream implements FileDescriptorAccess
An OutputStream for AFSocket, etc.
Author:
Christian Kohlschütter
  • Method Details

    • transferFrom

      public long transferFrom(InputStream in) throws IOException
      Reads all bytes from the given input stream and writes the bytes to this output stream in the order that they are read. On return, this input stream will be at end of stream. This method does not close either stream. This method effectively is the reverse notation of InputStream.transferTo(OutputStream), which may or may not be optimized for AFSockets.
      Parameters:
      in - The InputStream to transfer from.
      Returns:
      The number of bytes transferred.
      Throws:
      IOException - on error.