public class RecordingOutputStream extends OutputStream
Constructor and Description |
---|
RecordingOutputStream(OutputStream parentStream)
Constructs a new RecordingOutputStream that will all writes to
the given OutputStream.
|
Modifier and Type | Method and Description |
---|---|
void |
clearRecordedBytes()
Clear the bytes currently recorded by this output stream.
|
void |
close() |
void |
flush() |
org.forgerock.opendj.ldap.ByteString |
getRecordedBytes()
Retrieve the bytes read from this output stream since the last
clear.
|
boolean |
isRecordingEnabled()
Retrieves whether recording is enabled.
|
void |
setRecordingEnabled(boolean enabled)
Set whether if this output stream is recording all reads or not.
|
void |
write(byte[] bytes) |
void |
write(byte[] bytes,
int i,
int i1) |
void |
write(int i) |
public RecordingOutputStream(OutputStream parentStream)
parentStream
- The output stream to record.public void write(int i) throws IOException
write
in class OutputStream
IOException
public void write(byte[] bytes) throws IOException
write
in class OutputStream
IOException
public void write(byte[] bytes, int i, int i1) throws IOException
write
in class OutputStream
IOException
public void flush() throws IOException
flush
in interface Flushable
flush
in class OutputStream
IOException
public void close() throws IOException
close
in interface Closeable
close
in interface AutoCloseable
close
in class OutputStream
IOException
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.