Java byte[]转long

设有byte[]数组: byte[] buf

1 ByteArrayInputStream bais = new ByteArrayInputStream(buf);
2 DataInputStream dis = new DataInputStream(bais);
3 System.out.println(dis.readLong());

 

posted @ 2022-03-06 13:32  Ging2000  阅读(382)  评论(0)    收藏  举报