StringBuilder sb = sb0;
if (sb.length() >= maxLength) {
return sb;
}
if (o instanceof OtpErlangLong) {
final OtpErlangLong l = (OtpErlangLong) o;
try {
sb.append(l.charValue());
} catch (final OtpErlangRangeException e) {
}
} else if (o instanceof OtpErlangString) {
final OtpErlangString s = (OtpErlangString) o;
sb.append(s.stringValue());
} else if (o instanceof OtpErlangList) {
final OtpErlangList l = (OtpErlangList) o;
for (final OtpErlangObject i : l) {
if (sb.length() < maxLength) {
ioListToStringBuilder(i, sb, maxLength);
}
}
if (sb.length() < maxLength) {
ioListToStringBuilder(l.getLastTail(), sb, maxLength);
}
} else if (o instanceof OtpErlangBinary) {
final OtpErlangBinary b = (OtpErlangBinary) o;
String s = decode(b.binaryValue(), Charsets.UTF_8);
if (s == null) {