if (httpCode == HttpURLConnection.HTTP_OK) {
String mimeType = getResponseMIMEType(method);
try {
BooleanQueryResultFormat format = BooleanQueryResultFormat.matchMIMEType(mimeType, booleanFormats);
BooleanQueryResultParser parser = QueryResultIO.createParser(format);
return parser.parse(method.getResponseBodyAsStream());
}
catch (UnsupportedQueryResultFormatException e) {
throw new RepositoryException("Server responded with an unsupported file format: " + mimeType);
}
catch (QueryResultParseException e) {