public static void serializeToDisk ( File file , Object obj ) throws IOException { byte [ ] serializedObj = serialize ( obj ) ; try ( RandomAccessFile raFile = new RandomAccessFile ( file , "rw" ) ) { raFile . write ( serializedObj ) ; } }
Serialize an object to disk .