this.fault = fault;
return this;
}
public ResponseDefinition build() {
ResponseDefinition response;
if(isBinaryBody) {
response = new ResponseDefinition(status, bodyContent);
} else {
if(bodyContent==null) {
response = new ResponseDefinition(status, (String)null);
} else {
response = new ResponseDefinition(status, new String(bodyContent,Charset.forName(UTF_8.name())));
}
}
if (!headers.isEmpty()) {
response.setHeaders(new HttpHeaders(headers));
}
response.setBodyFileName(bodyFileName);
response.setFixedDelayMilliseconds(fixedDelayMilliseconds);
response.setProxyBaseUrl(proxyBaseUrl);
response.setFault(fault);
return response;
}