直接上代码:

//先写进去
long n = 1000000L;  
ByteArrayOutputStream baos = new ByteArrayOutputStream();  
DataOutputStream dos = new DataOutputStream(baos);  
dos.write(n);  
//再读出来
byte[] buf = baos.toByteArray();

相关文章:

  • 2022-12-23
  • 2021-11-20
  • 2021-08-06
  • 2021-12-23
  • 2022-01-15
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案