try
{
ByteBuffer byteBuffer=(ByteBuffer)value;
synchronized (byteBuffer)
{
NIOBuffer buffer = byteBuffer.isDirect()
?(NIOBuffer)new DirectNIOBuffer(byteBuffer,true)
:(NIOBuffer)new IndirectNIOBuffer(byteBuffer,true);
((HttpConnection.Output)getServletResponse().getOutputStream()).sendResponse(buffer);
}
}