|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.archive.io.ReplayCharSequenceFactory
public class ReplayCharSequenceFactory
Factory that returns a ReplayCharSequence view on to a recording stream.
This factory encapsulates the decision-making figuring which
ReplayCharSequence to return whether the single byte or multibyte handling
ReplayCharSequence implementations. Get instance of this factory
using getInstance() and then call
getReplayCharSequence(byte [], long, long, String, String).
| Field Summary | |
|---|---|
protected static java.util.logging.Logger |
logger
Logger. |
| Method Summary | |
|---|---|
protected void |
checkParameters(byte[] buffer,
long size,
long responseBodyStart)
Test passed arguments. |
static ReplayCharSequenceFactory |
getInstance()
|
ReplayCharSequence |
getReplayCharSequence(byte[] buffer,
long size,
long responseBodyStart,
java.lang.String backingFilename,
java.lang.String encoding)
Return appropriate ReplayCharSequence switching off passed encoding. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected static java.util.logging.Logger logger
| Method Detail |
|---|
public static ReplayCharSequenceFactory getInstance()
public ReplayCharSequence getReplayCharSequence(byte[] buffer,
long size,
long responseBodyStart,
java.lang.String backingFilename,
java.lang.String encoding)
throws java.io.IOException
buffer - In-memory buffer of recordings prefix. We read from here
first and will only go to the backing file if size requested
is greater than buffer.length.size - Total size of stream to replay in bytes. Used to find EOS.
This is total length of content including HTTP headers if present.responseBodyStart - Where the response body starts in bytes. Used to
skip over the HTTP headers if present.backingFilename - Full path to backing file with content in excess
of whats in buffer.encoding - Encoding to use reading the passed prefix buffer and
backing file. For now, should be java canonical name for the encoding.
(If null is passed, we will default to ByteReplayCharSequence).
java.io.IOException - Problems accessing backing file or writing new file
of the decoded content.
protected void checkParameters(byte[] buffer,
long size,
long responseBodyStart)
throws java.lang.IllegalArgumentException
buffer - In-memory buffer of recordings prefix. We read from here
first and will only go to the backing file if size requested
is greater than buffer.length.size - Total size of stream to replay in bytes. Used to find EOS.
This is total length of content including HTTP headers if present.responseBodyStart - Where the response body starts in bytes. Used to
skip over the HTTP headers if present.
java.lang.IllegalArgumentException - Thrown if passed an illegal argument.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||