java-org.hwo/src/org/hwo/ByteArrayHelper.java

29 lines
397 B
Java

package org.hwo;
public class ByteArrayHelper {
public ByteArrayHelper() {
}
public static byte[] unbox(Byte[] bytes){
byte[] t = new byte[ bytes.length ];
for (int i=0;i<t.length;i++)
t[i] = bytes[i];
return t;
}
public static Byte[] box(byte[] bytes){
Byte[] t = new Byte[ bytes.length ];
for (int i=0;i<t.length;i++)
t[i] = bytes[i];
return t;
}
}