question: public void writeTo ( DataOutput out ) throws IOException { out . writeInt ( typeId ) ; U . writeString ( out , typeName ) ; if ( fields == null ) out . writeInt ( - 1 ) ; else { out . writeInt ( fields . size ( ) ) ; for ( Map . Entry < String , Integer > fieldEntry : fields . entrySet ( ) ) { U . writeString ( out , fieldEntry . getKey ( ) ) ; out . writeInt ( fieldEntry . getValue ( ) ) ; } } U . writeString ( out , affKeyFieldName ) ; if ( schemas == null ) out . writeInt ( - 1 ) ; else { out . writeInt ( schemas . size ( ) ) ; for ( BinarySchema schema : schemas ) schema . writeTo ( out ) ; } out . writeBoolean ( isEnum ) ; }
target:  The object implements the writeTo method to save its contents by calling the methods of DataOutput for its primitive values and strings or calling the writeTo method for other objects.