code: @Override
      protected Document convertToObject(HTTPResponse httpResponse)
      {
          //get response text
          Document document=null;
          String content=httpResponse.getContent();
          if(content!=null)
          {
              //get response encoding
              String encoding=this.getResponseDataEncoding();
  
              //create in memory stream
              byte[] data=IOHelper.convertStringToBinary(content,encoding);
              InputStream inputStream=new ByteArrayInputStream(data);
  
              try
              {
                  //parse XML
                  DocumentBuilderFactory documentBuilderFactory=DocumentBuilderFactory.newInstance();
                  DocumentBuilder documentBuilder=documentBuilderFactory.newDocumentBuilder();
                  document=documentBuilder.parse(inputStream);
              }
              catch(Exception exception)
              {
                  throw new FaxException("Unable to parse HTTP response text as XML.",exception);
              }
              finally
              {
                  //'close' stream
                  IOHelper.closeResource(inputStream);
              }
          }
          
          return document;
      }
docs: This function converts the HTTP response content to the specific object.
  
  @param   httpResponse
  The HTTP response
  @return  The object