As an alternative to the print
solution a simple loop and using append_c
from the StringBuilder
in a loop works. Just append every byte till the end of array
var builder = new StringBuilder(buffer.length);for(int i=0; i<buffer.length; i++ { builder.append_c(buffer[i]);}