Class SocketOutputStream

java.lang.Object
java.io.OutputStream
org.apache.hadoop.net.SocketOutputStream
All Implemented Interfaces:
Closeable, Flushable, AutoCloseable, Channel, WritableByteChannel

@LimitedPrivate({"HDFS","MapReduce"}) @Unstable public class SocketOutputStream extends OutputStream implements WritableByteChannel
This implements an output stream that can have a timeout while writing. This sets non-blocking flag on the socket channel. So after creating this object , read() on Socket.getInputStream() and write() on Socket.getOutputStream() on the associated socket will throw llegalBlockingModeException. Please use SocketInputStream for reading.