boolean first) throws IOException {
ByteArrayOutputStream bos = new ByteArrayOutputStream();
ObjectOutputStream oos = new ObjectOutputStream(bos);
oos.writeObject(obj);
oos.flush();
saveByteArray(bos.toByteArray(), dirName, name);
}
public final void createByteArray(byte[] buf, String name) throws IOException {
saveByteArray(buf, null, name, true, true);
}