92: When writing the buffer, the underlying array is to be used, not the actual ByteBuffer

Contributed-by: jfdenise
Reviewed-by: asquare
This commit is contained in:
akhil 2013-11-26 09:53:43 -08:00
parent c343f1be38
commit b8d9e13f0e

View File

@ -62,7 +62,7 @@ public class StringDecoder {
public String write(Buffer buffer) {
// The received buffer can be fully consumed
ByteBuffer buff = ByteBuffer.allocate(buffer.capacity());
buff.put(buffer.underlying());
buff.put(buffer.array());
buff.flip();
ByteBuffer nBuffer = buff;
if (remaining != null) {