question: protected ResponseFormatType generateAcceptFormat ( String format ) throws BadApiRequestException { try { return format == null ? ResponseFormatType . JSON : ResponseFormatType . valueOf ( format . toUpperCase ( Locale . ENGLISH ) ) ; } catch ( IllegalArgumentException e ) { LOG . error ( ACCEPT_FORMAT_INVALID . logFormat ( format ) , e ) ; throw new BadApiRequestException ( ACCEPT_FORMAT_INVALID . format ( format ) ) ; } }
target:  Generates the format in which the response data is expected.