Reviewed-by: darcy
Use CharBuffer.limit(), not the length of the backing array Reviewed-by: mcimadamore