return new ContentBody(contentChunk.getData());
}
public ContentChunk convertToContentChunk(AMQBody body)
{
final ContentBody contentBodyChunk = (ContentBody) body;
return new ContentChunk()
{
public int getSize()
{
return contentBodyChunk.getSize();
}
public byte[] getData()
{
return contentBodyChunk.getPayload();
}
public void reduceToFit()
{
contentBodyChunk.reduceBufferToFit();
}
};
}