public static final void TestGetData() { byte[] buffer = Util.StringToByteArray("34 13 12 15 43 16"); ref<Integer> pos = new ref<Integer>(0); try { Object o = ProtoBase.GetData(buffer, pos, DataFmt.Data1); Logger.d("返回数据:" + o.toString()); } catch (ParseException e) { e.printStackTrace(); } }
public static final void TestSetData() { byte[] buffer = new byte[20]; ref<Integer> pos = new ref<Integer>(0); try { ProtoBase.SetData(buffer, pos, "2016-03-14 12:13:34", DataFmt.Data1); Logger.d("返回数组:" + Util.ByteArrayToString(buffer)); } catch (ParseException e) { e.printStackTrace(); } }