Fixed issue: NETTY-228 Method "ChannelBuffers.wrappedBuffer(ByteBuffer buffer)" does not always honor ByteOrder

This commit is contained in:
Trustin Lee 2009-09-21 01:24:19 +00:00
parent e67e99a847
commit 588cfa8518

View File

@ -293,7 +293,7 @@ public class ChannelBuffers {
return EMPTY_BUFFER;
}
if (!buffer.isReadOnly() && buffer.hasArray()) {
return wrappedBuffer(buffer.array(), buffer.arrayOffset(),buffer.remaining());
return wrappedBuffer(buffer.order(), buffer.array(), buffer.arrayOffset(),buffer.remaining());
} else {
return new ByteBufferBackedChannelBuffer(buffer);
}