Question:
Trying to solve what should be a simple problem. Got a list of Bytes, want to convert it at the end of a function to an array of bytes.
How-To
What you can do is use commons-lang's ArrayUtils.toPrimitive(wrapperCollection):
- Byte[] bytes = pdu.toArray(new Byte[pdu.size()]);
- return ArrayUtils.toPrimitive(bytes);
沒有留言:
張貼留言