If the last character of a chunk is a double quote and the next character at the beginning of the next chunk is also a double quote, both characters will be ignored and the output will not output any characters.
I believe this has to do with using data.charAt(i+1) and not looking at the previous field if data.charAt(i+1) is null.
Example:
test,123,"quote""d field here"
If the stream chunk ends here:
test,123,"quote""d field here"
^
The output value
test,123,"quoted field here
when it should read
test,123,"quote"d field here