deft
deft copied to clipboard
Raw byte[] instead of US_ASCII encoded String
Another good point made by github/williame
This is how we append data to the read buffer in the (buffered) AS. readBuffer.append(new String(buffer.array(), 0, buffer.position(), Charsets.US_ASCII));
It's probably a bad idea to prematurely US_ASCII encode the data at this low level. (Encoding should be protocol/client specific). We should consider providing raw byte[] instead.