question: public static byte [ ] serializeJdk ( Object obj ) throws IOException { ByteArrayOutputStream byteOut = null ; ObjectOutputStream objOut = null ; try { byteOut = new ByteArrayOutputStream ( 512 ) ; objOut = new ObjectOutputStream ( byteOut ) ; objOut . writeObject ( obj ) ; objOut . flush ( ) ; return byteOut . toByteArray ( ) ; } finally { close ( objOut ) ; close ( byteOut ) ; } }
target:  Serializes a given object into byte array.