If so, you can do this sort of thing:
Vector v = new Vector();
for(int i = 0;i < 10;i++) {
Byte b = new Byte((byte)i);
v.add(b);
}
Byte[] bytes = (Byte[])v.toArray(new Byte[10]);
System.out.println(bytes);
Main Topics
Browse All Topics





by: CEHJPosted on 2004-03-31 at 10:28:22ID: 10725946
You're right that its contents have also to be Serializable. What do you want to do? Do you really mean Byte[]?