| org.archive.io.SeekInputStream org.archive.io.ReplayInputStream
ReplayInputStream | public class ReplayInputStream extends SeekInputStream (Code) | | Replays the bytes recorded from a RecordingInputStream or
RecordingOutputStream.
This InputStream supports mark and reset.
author: gojomo |
Constructor Summary | |
public | ReplayInputStream(byte[] buffer, long size, long responseBodyStart, String backingFilename) Constructor.
Parameters: buffer - Buffer to read from. Parameters: size - Size of data to replay. Parameters: responseBodyStart - Start of the response body. Parameters: backingFilename - Backing file that sits behind the buffer. | public | ReplayInputStream(byte[] buffer, long size, String backingFilename) Constructor.
Parameters: buffer - Buffer to read from. Parameters: size - Size of data to replay. Parameters: backingFilename - Backing file that sits behind the buffer. |
responseBodyStart | protected long responseBodyStart(Code) | | Where the response body starts, if marked
|
ReplayInputStream | public ReplayInputStream(byte[] buffer, long size, long responseBodyStart, String backingFilename) throws IOException(Code) | | Constructor.
Parameters: buffer - Buffer to read from. Parameters: size - Size of data to replay. Parameters: responseBodyStart - Start of the response body. Parameters: backingFilename - Backing file that sits behind the buffer. Ifsize > than buffer then we go to backing file to readdata that is beyond buffer.length. throws: IOException - If we fail to open an input stream onbacking file. |
ReplayInputStream | public ReplayInputStream(byte[] buffer, long size, String backingFilename) throws IOException(Code) | | Constructor.
Parameters: buffer - Buffer to read from. Parameters: size - Size of data to replay. Parameters: backingFilename - Backing file that sits behind the buffer. Ifsize > than buffer then we go to backing file to readdata that is beyond buffer.length. throws: IOException - If we fail to open an input stream onbacking file. |
getContentSize | public long getContentSize()(Code) | | Total size of content.
the size of the content. |
getHeaderSize | public long getHeaderSize()(Code) | | Total size of header.
the size of the header. |
getSize | public long getSize()(Code) | | Total size of stream content.
Returns the size. |
position | public void position(long p) throws IOException(Code) | | Reposition the stream.
Parameters: p - the new position for this stream throws: IOException - if an IO error occurs |
remaining | public long remaining()(Code) | | Amount THEORETICALLY remaining (TODO: Its not theoreticalseemingly. The class implemetentation depends on it being exact). |
|
|