Roll it all back.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3432 542714f4-19e9-0310-aa3c-eee0fc999fb1
This commit is contained in:
@@ -44,7 +44,7 @@ public class FramingOutputStream extends OutputStream
|
||||
{
|
||||
public FramingOutputStream ()
|
||||
{
|
||||
_buffer = ByteBuffer.allocate(INITIAL_BUFFER_SIZE);
|
||||
_buffer = ByteBuffer.allocateDirect(INITIAL_BUFFER_SIZE);
|
||||
_buffer.put(HEADER_PAD);
|
||||
}
|
||||
|
||||
@@ -99,7 +99,7 @@ public class FramingOutputStream extends OutputStream
|
||||
if (ncapacity > ocapacity) {
|
||||
// increase the buffer size in large increments
|
||||
ncapacity = Math.max(ocapacity << 1, ncapacity);
|
||||
ByteBuffer newbuf = ByteBuffer.allocate(ncapacity);
|
||||
ByteBuffer newbuf = ByteBuffer.allocateDirect(ncapacity);
|
||||
newbuf.put((ByteBuffer)_buffer.flip());
|
||||
_buffer = newbuf;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user