public class RecordingInputStream extends InputStream
Constructor and Description |
---|
RecordingInputStream(InputStream parentStream)
Constructs a new RecordingInputStream that will record all reads
from the given input stream.
|
Modifier and Type | Method and Description |
---|---|
int |
available() |
void |
clearRecordedBytes()
Clear the bytes currently recorded by this input stream.
|
void |
close() |
org.forgerock.opendj.ldap.ByteString |
getRecordedBytes()
Retrieve the bytes read from this input stream since the last
clear.
|
boolean |
isRecordingEnabled()
Retrieves whether recording is enabled.
|
void |
mark(int i) |
boolean |
markSupported() |
int |
read() |
int |
read(byte[] bytes) |
int |
read(byte[] bytes,
int i,
int i1) |
void |
reset() |
void |
setRecordingEnabled(boolean enabled)
Set whether if this input stream is recording all reads or not.
|
long |
skip(long l) |
public RecordingInputStream(InputStream parentStream)
parentStream
- The input stream to record.public int read() throws IOException
read
in class InputStream
IOException
public int read(byte[] bytes) throws IOException
read
in class InputStream
IOException
public int read(byte[] bytes, int i, int i1) throws IOException
read
in class InputStream
IOException
public long skip(long l) throws IOException
skip
in class InputStream
IOException
public int available() throws IOException
available
in class InputStream
IOException
public void close() throws IOException
close
in interface Closeable
close
in interface AutoCloseable
close
in class InputStream
IOException
public void mark(int i)
mark
in class InputStream
public void reset() throws IOException
reset
in class InputStream
IOException
public boolean markSupported()
markSupported
in class InputStream
public org.forgerock.opendj.ldap.ByteString getRecordedBytes()
public void clearRecordedBytes()
public boolean isRecordingEnabled()
public void setRecordingEnabled(boolean enabled)
enabled
- true
to recording all reads or
false
otherwise.Copyright © 2010-2017 ForgeRock AS. All Rights Reserved.