@Override public void handleResponse(HttpMethod method) throws IOException, AGHttpException { String mimeType = getResponseMIMEType(method); if (!mimeType.equals(getRequestMIMEType())) { throw new AGHttpException("unexpected response MIME type: " + mimeType); } InputStream response = getInputStream(method); try { BooleanQueryResultFormat format = BooleanQueryResultFormat.TEXT; BooleanQueryResultParser parser = QueryResultIO.createBooleanParser(format); result = parser.parse(response); } catch (QueryResultParseException e) { throw new AGHttpException(e); } }