private void writeObject ( final ObjectOutputStream out ) throws IOException { // Default write of non-transient fields out . defaultWriteObject ( ) ; // Write as ZIP final InputStream in = archive . as ( ZipExporter . class ) . exportAsInputStream ( ) ; try { IOUtil . copy ( in , out ) ; // Don't close the outstream // Write the ID explicitly out . writeObject ( id ) ; } finally { // In case we get an InputStream type that supports closing in . close ( ) ; } // Log if ( log . isLoggable ( Level . FINER ) ) { log . finer ( "Wrote archive: " + archive . toString ( ) ) ; } }
Serializes the invocation with a custom form