Package hudson.remoting
Class BinarySafeStream
- java.lang.Object
-
- hudson.remoting.BinarySafeStream
-
public final class BinarySafeStream extends Object
Tunnels byte stream into another byte stream so that binary data can be sent across binary-unsafe stream.This implementation uses a variation of base64. A care has been taken to ensure that the following scenario is handled correctly.
- If the writing side flush, the reading side should see everything written by then, without blocking (even if this happens outside the 3-byte boundary)
- Reading side won't block unnecessarily.
- Author:
- Kohsuke Kawaguchi
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static InputStream
wrap(InputStream in)
Decode binary safe stream.static OutputStream
wrap(OutputStream out)
Wraps anOutputStream
to encodingOutputStream
.
-
-
-
Method Detail
-
wrap
public static InputStream wrap(InputStream in)
Decode binary safe stream.
-
wrap
public static OutputStream wrap(OutputStream out)
Wraps anOutputStream
to encodingOutputStream
.- Parameters:
out
- This output stream should be buffered for better performance.
-
-