Package hudson.remoting
Class BinarySafeStream
java.lang.Object
hudson.remoting.BinarySafeStream
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
Modifier and TypeMethodDescriptionstatic InputStreamwrap(InputStream in) Decode binary safe stream.static OutputStreamwrap(OutputStream out) Wraps anOutputStreamto encodingOutputStream.
-
Method Details
-
wrap
Decode binary safe stream. -
wrap
Wraps anOutputStreamto encodingOutputStream.- Parameters:
out- This output stream should be buffered for better performance.
-