|
|
@@ -797,7 +797,17 @@ public class Convert
|
|
797
|
797
|
}
|
|
798
|
798
|
else if (obj instanceof byte[] || obj instanceof Byte[])
|
|
799
|
799
|
{
|
|
800
|
|
- return str((Byte[]) obj, charset);
|
|
|
800
|
+ if (obj instanceof byte[]){
|
|
|
801
|
+ return str((byte[]) obj, charset);
|
|
|
802
|
+ } else {
|
|
|
803
|
+ Byte[] bytes = (Byte[])obj;
|
|
|
804
|
+ int length = bytes.length;
|
|
|
805
|
+ byte[] dest = new byte[length];
|
|
|
806
|
+ for (int i = 0; i < length; i++) {
|
|
|
807
|
+ dest[i] = bytes[i];
|
|
|
808
|
+ }
|
|
|
809
|
+ return str (dest,charset);
|
|
|
810
|
+ }
|
|
801
|
811
|
}
|
|
802
|
812
|
else if (obj instanceof ByteBuffer)
|
|
803
|
813
|
{
|