public final class HeaderStreams
extends java.lang.Object
Modifier and Type | Method and Description |
---|---|
static java.io.InputStream |
augInput(byte[] hd,
java.io.InputStream s)
Create an
InputStream which transparently attaches an extra header
to the underlying stream. |
static java.io.OutputStream |
dimOutput(byte[] hd,
java.io.OutputStream s)
Create an
OutputStream which transparently swallows the expected
header written to the underlying stream. |
public static java.io.InputStream augInput(byte[] hd, java.io.InputStream s) throws java.io.IOException
InputStream
which transparently attaches an extra header
to the underlying stream.java.io.IOException
public static java.io.OutputStream dimOutput(byte[] hd, java.io.OutputStream s)
OutputStream
which transparently swallows the expected
header written to the underlying stream.
The write
methods will throw IOException
if bytes
different from the header are written.