Package hudson.remoting
Class SocketChannelStream
- java.lang.Object
-
- hudson.remoting.SocketChannelStream
-
public class SocketChannelStream extends Object
WrapsSocketChannel
intoInputStream
/OutputStream
in a way that avoids deadlock when read/write happens concurrently.- Author:
- Kohsuke Kawaguchi
- See Also:
- discussion with references to JDK bugs; TODO JDK-8222774 simplify in Java 17
-
-
Constructor Summary
Constructors Constructor Description SocketChannelStream()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static InputStream
in(Socket s)
static InputStream
in(SocketChannel ch)
static OutputStream
out(Socket s)
static OutputStream
out(SocketChannel ch)
-
-
-
Method Detail
-
in
public static InputStream in(Socket s) throws IOException
- Throws:
IOException
-
in
public static InputStream in(SocketChannel ch) throws IOException
- Throws:
IOException
-
out
public static OutputStream out(Socket s) throws IOException
- Throws:
IOException
-
out
public static OutputStream out(SocketChannel ch) throws IOException
- Throws:
IOException
-
-