Package hudson.remoting
Class SocketOutputStream
- java.lang.Object
-
- java.io.OutputStream
-
- java.io.FilterOutputStream
-
- hudson.remoting.SocketOutputStream
-
- All Implemented Interfaces:
Closeable
,Flushable
,AutoCloseable
public class SocketOutputStream extends FilterOutputStream
InputStream
connected to socket.Unlike plain
Socket.getOutputStream()
, closing the stream does not close the entire socket, and instead it merely partial-close a socket in the direction.- Author:
- Kohsuke Kawaguchi
-
-
Field Summary
-
Fields inherited from class java.io.FilterOutputStream
out
-
-
Constructor Summary
Constructors Constructor Description SocketOutputStream(Socket socket)
Deprecated.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
close()
void
write(byte[] b)
void
write(byte[] b, int off, int len)
void
write(int b)
-
Methods inherited from class java.io.FilterOutputStream
flush
-
Methods inherited from class java.io.OutputStream
nullOutputStream
-
-
-
-
Constructor Detail
-
SocketOutputStream
@Deprecated public SocketOutputStream(Socket socket) throws IOException
Deprecated.- Throws:
IOException
-
-
Method Detail
-
write
public void write(int b) throws IOException
- Overrides:
write
in classFilterOutputStream
- Throws:
IOException
-
write
public void write(@NonNull byte[] b) throws IOException
- Overrides:
write
in classFilterOutputStream
- Throws:
IOException
-
write
public void write(@NonNull byte[] b, int off, int len) throws IOException
- Overrides:
write
in classFilterOutputStream
- Throws:
IOException
-
close
public void close() throws IOException
- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
- Overrides:
close
in classFilterOutputStream
- Throws:
IOException
-
-