java.lang.Object
java.io.OutputStream
org.newsclub.net.unix.AFOutputStream
- All Implemented Interfaces:
Closeable
,Flushable
,AutoCloseable
,FileDescriptorAccess
@IgnoreJRERequirement
public abstract class AFOutputStream
extends OutputStream
implements FileDescriptorAccess
An
OutputStream
for AFSocket
, etc.- Author:
- Christian Kohlschütter
-
Method Summary
Modifier and TypeMethodDescriptionlong
Reads all bytes from the given input stream and writes the bytes to this output stream in the order that they are read.Methods inherited from class java.io.OutputStream
close, flush, nullOutputStream, write, write, write
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.newsclub.net.unix.FileDescriptorAccess
getFileDescriptor
-
Method Details
-
transferFrom
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 ofInputStream.transferTo(OutputStream)
, which may or may not be optimized forAFSocket
s.- Parameters:
in
- TheInputStream
to transfer from.- Returns:
- The number of bytes transferred.
- Throws:
IOException
- on error.
-