code: protected TLVElement parse(int statusCode, String responseMessage, InputStream response) throws HttpProtocolException {
          try {
              return TLVElement.create(Util.toByteArray(response));
          } catch (Exception e) {
              if (logger.isDebugEnabled()) {
                  logger.debug("Invalid TLV response.", e);
              }
              throw new HttpProtocolException(statusCode, responseMessage);
          }
      }
docs: Validates HTTP response message.
  
  @param statusCode
  HTTP status code.
  @param responseMessage
  HTTP header response message.
  @param response
  response input stream.
  
  @return {@link TLVElement}
  @throws HttpProtocolException
  will be thrown when KSI HTTP response is not valid.