question: public static < IN > byte [ ] serialize ( IN object , TypeSerializer < IN > serializer ) throws IOException { ByteArrayOutputStream baos = new ByteArrayOutputStream ( ) ; DataOutputViewStreamWrapper wrapper = new DataOutputViewStreamWrapper ( new DataOutputStream ( baos ) ) ; serializer . serialize ( object , wrapper ) ; return baos . toByteArray ( ) ; }
target:  Serialize an object using a TypeSerializer.