Remove some redundant casts.
This commit is contained in:
@@ -91,7 +91,7 @@ public class ByteBufferOutputStream extends OutputStream
|
|||||||
// increase the buffer size in large increments
|
// increase the buffer size in large increments
|
||||||
ncapacity = Math.max(ocapacity << 1, ncapacity);
|
ncapacity = Math.max(ocapacity << 1, ncapacity);
|
||||||
ByteBuffer newbuf = ByteBuffer.allocate(ncapacity);
|
ByteBuffer newbuf = ByteBuffer.allocate(ncapacity);
|
||||||
newbuf.put((ByteBuffer)_buffer.flip());
|
newbuf.put(_buffer.flip());
|
||||||
_buffer = newbuf;
|
_buffer = newbuf;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -117,7 +117,7 @@ public class FramedInputStream extends InputStream
|
|||||||
// otherwise, we've filled up our buffer as a result of this
|
// otherwise, we've filled up our buffer as a result of this
|
||||||
// read, expand it and try reading some more
|
// read, expand it and try reading some more
|
||||||
ByteBuffer newbuf = ByteBuffer.allocate(_buffer.capacity() << 1);
|
ByteBuffer newbuf = ByteBuffer.allocate(_buffer.capacity() << 1);
|
||||||
newbuf.put((ByteBuffer)_buffer.flip());
|
newbuf.put(_buffer.flip());
|
||||||
_buffer = newbuf;
|
_buffer = newbuf;
|
||||||
|
|
||||||
// don't let things grow without bounds
|
// don't let things grow without bounds
|
||||||
|
|||||||
Reference in New Issue
Block a user