public class MarkShieldInputStream extends ProxyInputStream
ByteArrayInputStream
which removes the synchronization overhead for non-concurrent
access; as such this class is not thread-safe.
Proxy stream that prevents the underlying input stream from being marked/reset.
This class is typically used in cases where an input stream that supports marking needs to be passed to a component that wants to explicitly mark the stream, but it is not desirable to allow marking of the stream.
Constructor and Description |
---|
MarkShieldInputStream(java.io.InputStream in)
Creates a proxy that shields the given input stream from being
marked or rest.
|
Modifier and Type | Method and Description |
---|---|
void |
mark(int readlimit)
Invokes the delegate's
mark(int) method. |
boolean |
markSupported()
Invokes the delegate's
markSupported() method. |
void |
reset()
Invokes the delegate's
reset() method. |
public MarkShieldInputStream(java.io.InputStream in)
in
- underlying input streampublic void mark(int readlimit)
ProxyInputStream
mark(int)
method.mark
in class ProxyInputStream
readlimit
- read ahead limitpublic boolean markSupported()
ProxyInputStream
markSupported()
method.markSupported
in class ProxyInputStream
public void reset() throws java.io.IOException
ProxyInputStream
reset()
method.reset
in class ProxyInputStream
java.io.IOException
- if an I/O error occurs.Copyright © 2010 - 2023 Adobe. All Rights Reserved