public final class ContentBuffer extends Object
| Modifier and Type | Field and Description |
|---|---|
static int |
DEFAULT_SZ |
| Constructor and Description |
|---|
ContentBuffer() |
ContentBuffer(boolean useDirect) |
ContentBuffer(ContentBuffer toclone)
Internal use: copy constructor
|
ContentBuffer(int sz,
boolean useDirect) |
| Modifier and Type | Method and Description |
|---|---|
int |
appendFromBytes(byte[] source,
int offset,
int len) |
byte[] |
getBufferRefInternal()
Get a reference to the internal backing byte array.
|
ByteBuffer |
getByteBufferRefInternal() |
int |
getLimit() |
int |
read(int srcPos,
byte[] destination,
int destPos,
int length)
Read data.
|
void |
reset() |
int |
writeFromBytes(byte[] source,
int offset,
int len) |
int |
writeFromStream(InputStream istr,
int offset,
int length) |
public static final int DEFAULT_SZ
public ContentBuffer()
public ContentBuffer(boolean useDirect)
public ContentBuffer(int sz,
boolean useDirect)
public ContentBuffer(ContentBuffer toclone)
toclone - parameterpublic final void reset()
public int getLimit()
public int appendFromBytes(byte[] source,
int offset,
int len)
public int writeFromBytes(byte[] source,
int offset,
int len)
public int writeFromStream(InputStream istr, int offset, int length) throws IOException
IOExceptionpublic int read(int srcPos,
byte[] destination,
int destPos,
int length)
destination - Byte array to which content will be copied.length - Number of bytes to attempt to read.public byte[] getBufferRefInternal()
public ByteBuffer getByteBufferRefInternal()
Copyright 2004-2021 Solace Corporation. All rights reserved.