Java - 字节[]到byte [] [英] Java - Byte[] to byte[]
本文介绍了Java - 字节[]到byte []的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
有Vector和DataOutputStream。我需要将Vector中的字节(toArray返回Byte [])写入流,但它只能理解byte []。如何将Byte []转换为byte []?
There is Vector and DataOutputStream. I need to write bytes from Vector (toArray returns Byte[]) to the stream, but it understands byte[] only. How to convert Byte[] to byte[] ?
推荐答案
您可以使用 Apache Commons lang 库中的> toPrimitive 方法 ArrayUtils class?
You could use the toPrimitive method in the Apache Commons lang library ArrayUtils class?
这篇关于Java - 字节[]到byte []的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文