| java.lang.Object java.io.InputStream org.archive.io.RecordingInputStream
RecordingInputStream | public class RecordingInputStream extends InputStream (Code) | | Stream which records all data read from it, which it acquires from a wrapped
input stream.
Makes use of a RecordingOutputStream for recording because of its being
file backed so we can write massive amounts of data w/o worrying about
overflowing memory.
author: gojomo |
drainBuffer | protected byte[] drainBuffer(Code) | | Reusable buffer to avoid reallocation on each readFullyUntil
|
RecordingInputStream | public RecordingInputStream(int bufferSize, String backingFilename)(Code) | | Create a new RecordingInputStream.
Parameters: bufferSize - Size of buffer to use. Parameters: backingFilename - Name of backing file. |
getContentBegin | public long getContentBegin()(Code) | | |
getDigestValue | public byte[] getDigestValue()(Code) | | Return the digest value for any recorded, digested data. Call
only after all data has been recorded; otherwise, the running
digest state is ruined.
the digest final value |
getReplayCharSequence | public ReplayCharSequence getReplayCharSequence(String characterEncoding) throws IOException(Code) | | Parameters: characterEncoding - Encoding of recorded stream. A ReplayCharSequence Will return null if an IOException. Callclose on returned RCS when done. throws: IOException - |
getResponseContentLength | public long getResponseContentLength()(Code) | | |
getSize | public long getSize()(Code) | | |
isOpen | public boolean isOpen()(Code) | | True if we've been opened. |
mark | public synchronized void mark(int readlimit)(Code) | | |
markContentBegin | public void markContentBegin()(Code) | | |
markSupported | public boolean markSupported()(Code) | | |
setDigest | public void setDigest(String algorithm)(Code) | | Sets a digest algorithm which may be applied to recorded data.
As usually only a subset of the recorded data should
be fed to the digest, you must also call startDigest()
to begin digesting.
Parameters: algorithm - |
setDigest | public void setDigest(MessageDigest md)(Code) | | Sets a digest function which may be applied to recorded data.
As usually only a subset of the recorded data should
be fed to the digest, you must also call startDigest()
to begin digesting.
Parameters: md - |
setLimits | public void setLimits(long hardMax, long timeoutMs, long maxRateKBps)(Code) | | Set limits to be enforced by internal recording-out
|
setSha1Digest | public void setSha1Digest()(Code) | | Convenience method for setting SHA1 digest.
|
startDigest | public void startDigest()(Code) | | |
|
|