IOException {
if (objs.length != names.length) throw new IOException("array length isn't equal.");
ObjectOutputStream out = new ObjectOutputStream(new FileOutputStream(fileName));
out.writeInt(objs.length);
for (int i = 0; i < objs.length; i++) {
out.writeChars(names[i]);
out.writeInt(objs[i].length);
for (KeyPointN kp : objs[i]) {
out.writeObject(kp);
}
}