question: public static byte [ ] serializeToByteArray ( Serializable value ) { try { ByteArrayOutputStream buffer = new ByteArrayOutputStream ( ) ; try ( ObjectOutputStream oos = new ObjectOutputStream ( new SnappyOutputStream ( buffer ) ) ) { oos . writeObject ( value ) ; } return buffer . toByteArray ( ) ; } catch ( IOException exn ) { throw new IllegalArgumentException ( "unable to serialize " + value , exn ) ; } }
target:  Serializes the argument into an array of bytes, and returns it.