public class ProxyCallbackBuffer
extends java.lang.Object
ProxyCallback
. It is used to transfer a chunk of bytes
read by the proxy and in turn the response of the ProxyCallback.AnonProxyRequest#run()}
,
AnonProxyRequest.Response#run()}
,
ProxyCallback#handleUpstreamChunk(AnonProxyRequest, ProxyCallbackBuffer)}
,
ProxyCallback#handleDownstreamChunk(AnonProxyRequest, ProxyCallbackBuffer)}
Constructor and Description |
---|
ProxyCallbackBuffer() |
ProxyCallbackBuffer(byte[] chunk)
Set the byte array chunk as the content of the internal buffer.
|
ProxyCallbackBuffer(byte[] chunk,
int modifcationStartOffset,
int payloadLength) |
ProxyCallbackBuffer(byte[] chunk,
int modifcationStartOffset,
int modifcationEndOffset,
int payloadLength) |
Modifier and Type | Method and Description |
---|---|
void |
copyLeadingData(byte[] dest) |
void |
copyLeadingData(byte[] dest,
int destPos) |
void |
copyLeadingData(java.io.ByteArrayOutputStream dest) |
void |
copyTrailingData(byte[] dest,
int destPos) |
void |
copyTrailingData(java.io.ByteArrayOutputStream dest) |
byte[] |
extractModificationData() |
byte[] |
getChunk() |
int |
getLeadingDataLength() |
int |
getModificationDataLength() |
int |
getModificationEndOffset() |
int |
getModificationStartOffset() |
int |
getPayloadLength() |
int |
getStatus() |
int |
getTrailingDataLength() |
void |
injectModificationData(byte[] modificationData) |
void |
injectModificationData(byte[] modificationData,
int offset,
int length) |
void |
setChunk(byte[] chunk) |
void |
setModificationEndOffset(int modificationEndOffset) |
void |
setModificationStartOffset(int modificationStartOffset) |
void |
setPayloadLength(int payloadLength) |
void |
setStatus(int status) |
public ProxyCallbackBuffer()
public ProxyCallbackBuffer(byte[] chunk)
chunk
- bytes to copypublic ProxyCallbackBuffer(byte[] chunk, int modifcationStartOffset, int payloadLength)
public ProxyCallbackBuffer(byte[] chunk, int modifcationStartOffset, int modifcationEndOffset, int payloadLength)
public byte[] getChunk()
public void setChunk(byte[] chunk)
public int getModificationStartOffset()
public void setModificationStartOffset(int modificationStartOffset)
public int getModificationEndOffset()
public void setModificationEndOffset(int modificationEndOffset)
public int getPayloadLength()
public void setPayloadLength(int payloadLength)
public int getStatus()
public void setStatus(int status)
public void copyLeadingData(java.io.ByteArrayOutputStream dest)
public void copyLeadingData(byte[] dest)
public void copyLeadingData(byte[] dest, int destPos)
public void copyTrailingData(java.io.ByteArrayOutputStream dest)
public void copyTrailingData(byte[] dest, int destPos)
public byte[] extractModificationData()
public void injectModificationData(byte[] modificationData)
public void injectModificationData(byte[] modificationData, int offset, int length)
public int getModificationDataLength()
public int getLeadingDataLength()
public int getTrailingDataLength()
Copyright © 2023. All rights reserved.