arraycopy 报异常:Hit uncaught exception java.lang.ArrayStoreException

byte[] cmd new byte[1024]String ttttSystem.arraycopy(tt,0,cmd,8,tt.length())Hit uncaught ex

byte[] cmd = new byte[1024];
  String tt;
  tt="";
  System.arraycopy(tt,0,cmd,8,tt.length());
 
 
 
  Hit uncaught exception java.lang.ArrayStoreException

------解决方法--------------------------------------------------------
System.arraycopy这个是用来copy数组的不是用来生成String的,比如byte[] a copy 到
  byte[] b
  你想要的是下面这个吧
  byte[] cmd = new byte[1024];
  String tt = new String(cmd);