|
|
@ -798,14 +798,23 @@ public class Convert |
|
|
|
{ |
|
|
|
return (String) obj; |
|
|
|
} |
|
|
|
else if (obj instanceof byte[]) |
|
|
|
else if (obj instanceof byte[] || obj instanceof Byte[]) |
|
|
|
{ |
|
|
|
if (obj instanceof byte[]) |
|
|
|
{ |
|
|
|
return str((byte[]) obj, charset); |
|
|
|
} |
|
|
|
else if (obj instanceof Byte[]) |
|
|
|
else |
|
|
|
{ |
|
|
|
Byte[] bytes = (Byte[]) obj; |
|
|
|
int length = bytes.length; |
|
|
|
byte[] dest = new byte[length]; |
|
|
|
for (int i = 0; i < length; i++) |
|
|
|
{ |
|
|
|
byte[] bytes = ArrayUtils.toPrimitive((Byte[]) obj); |
|
|
|
return str(bytes, charset); |
|
|
|
dest[i] = bytes[i]; |
|
|
|
} |
|
|
|
return str(dest, charset); |
|
|
|
} |
|
|
|
} |
|
|
|
else if (obj instanceof ByteBuffer) |
|
|
|
{ |
|
|
@ -961,9 +970,7 @@ public class Convert |
|
|
|
c[i] = (char) (c[i] - 65248); |
|
|
|
} |
|
|
|
} |
|
|
|
String returnString = new String(c); |
|
|
|
|
|
|
|
return returnString; |
|
|
|
return new String(c); |
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
|