@Override public void writeExternal(ObjectOutput out) throws IOException { out.writeInt(2); out.writeInt(548); out.writeInt(348); byte[] bytes = new byte[1024]; for (int i = 0; i < 548; i++) { bytes[i] = 1; } out.write(bytes, 0, 548); bytes = new byte[1024]; for (int i = 0; i < 348; i++) { bytes[i] = 2; } out.write(bytes, 0, 348); }
@Override public void writeExternal(ObjectOutput out) throws IOException { out.writeInt(size()); for (int i = 0; i < size(); i++) { out.writeObject(get(i)); } }