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 InputStreamIOExceptionpublic int read(byte[] bytes) throws IOException
read in class InputStreamIOExceptionpublic int read(byte[] bytes, int i, int i1) throws IOException
read in class InputStreamIOExceptionpublic long skip(long l) throws IOException
skip in class InputStreamIOExceptionpublic int available() throws IOException
available in class InputStreamIOExceptionpublic void close() throws IOException
close in interface Closeableclose in interface AutoCloseableclose in class InputStreamIOExceptionpublic void mark(int i)
mark in class InputStreampublic void reset() throws IOException
reset in class InputStreamIOExceptionpublic boolean markSupported()
markSupported in class InputStreampublic 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-2015 ForgeRock AS. All Rights Reserved.