void writeObjectAsString ( Object value , Class < ? > effectiveType ) throws IOException { String converted = settings . getConverter ( ) . convertToString ( effectiveType , value ) ; if ( converted == null ) { throw new IllegalArgumentException ( "Unable to write because converter returned a null string: " + value ) ; } output . writeString ( converted ) ; }
called after discerning that the value is not a simple type