gpt4 book ai didi

org.apache.xmlrpc.client.XmlRpcHttpTransport.isUsingByteArrayOutput()方法的使用及代码示例

转载 作者:知者 更新时间:2024-03-20 04:27:40 27 4
gpt4 key购买 nike

本文整理了Java中org.apache.xmlrpc.client.XmlRpcHttpTransport.isUsingByteArrayOutput()方法的一些代码示例,展示了XmlRpcHttpTransport.isUsingByteArrayOutput()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。XmlRpcHttpTransport.isUsingByteArrayOutput()方法的具体详情如下:
包路径:org.apache.xmlrpc.client.XmlRpcHttpTransport
类名称:XmlRpcHttpTransport
方法名:isUsingByteArrayOutput

XmlRpcHttpTransport.isUsingByteArrayOutput介绍

暂无

代码示例

代码示例来源:origin: rosjava/rosjava_core

protected boolean isUsingByteArrayOutput(XmlRpcHttpClientConfig pConfig) {
  boolean result = super.isUsingByteArrayOutput(pConfig);
  if (!result) {
    throw new IllegalStateException("The Content-Length header is required with HTTP/1.0, and HTTP/1.1 is unsupported by the Lite HTTP Transport.");
  }
  return result;
}

代码示例来源:origin: org.apache.xmlrpc/xmlrpc-client

protected boolean isUsingByteArrayOutput(XmlRpcHttpClientConfig pConfig) {
  boolean result = super.isUsingByteArrayOutput(pConfig);
  if (!result) {
    throw new IllegalStateException("The Content-Length header is required with HTTP/1.0, and HTTP/1.1 is unsupported by the Lite HTTP Transport.");
  }
  return result;
}

代码示例来源:origin: xmlrpc/xmlrpc-client

protected boolean isUsingByteArrayOutput(XmlRpcHttpClientConfig pConfig) {
  boolean result = super.isUsingByteArrayOutput(pConfig);
  if (!result) {
    throw new IllegalStateException("The Content-Length header is required with HTTP/1.0, and HTTP/1.1 is unsupported by the Lite HTTP Transport.");
  }
  return result;
}

代码示例来源:origin: xmlrpc/xmlrpc-client

public void writeRequest(OutputStream pOut) throws IOException {
  try {
    /* Make sure, that the socket is not closed by replacing it with our
     * own BufferedOutputStream.
     */
    OutputStream ostream;
    if (isUsingByteArrayOutput(config)) {
      // No need to buffer the output.
      ostream = new FilterOutputStream(pOut){
        public void close() throws IOException {
          flush();
        }
      };
    } else {
      ostream = new BufferedOutputStream(pOut){
        public void close() throws IOException {
          flush();
        }
      };
    }
    pWriter.write(ostream);
  } catch (XmlRpcException e) {
    throw new XmlRpcIOException(e);
  } catch (SAXException e) {
    throw new XmlRpcIOException(e);
  }
}
public long getContentLength() { return contentLength; }

代码示例来源:origin: rosjava/rosjava_core

protected ReqWriter newReqWriter(XmlRpcRequest pRequest)
      throws XmlRpcException, IOException, SAXException {
    final XmlRpcHttpClientConfig config = (XmlRpcHttpClientConfig) pRequest.getConfig();
    if (isUsingByteArrayOutput(config)) {
      ByteArrayReqWriter reqWriter = new ByteArrayReqWriter(pRequest);
      setContentLength(reqWriter.getContentLength());
      if (isCompressingRequest(config)) {
        return new GzipReqWriter(reqWriter);
      }
      return reqWriter;
    } else {
      return super.newReqWriter(pRequest);
    }
  }
}

代码示例来源:origin: org.apache.xmlrpc/xmlrpc-client

protected ReqWriter newReqWriter(XmlRpcRequest pRequest)
      throws XmlRpcException, IOException, SAXException {
    final XmlRpcHttpClientConfig config = (XmlRpcHttpClientConfig) pRequest.getConfig();
    if (isUsingByteArrayOutput(config)) {
      ByteArrayReqWriter reqWriter = new ByteArrayReqWriter(pRequest);
      setContentLength(reqWriter.getContentLength());
      if (isCompressingRequest(config)) {
        return new GzipReqWriter(reqWriter);
      }
      return reqWriter;
    } else {
      return super.newReqWriter(pRequest);
    }
  }
}

代码示例来源:origin: xmlrpc/xmlrpc-client

protected ReqWriter newReqWriter(XmlRpcRequest pRequest)
      throws XmlRpcException, IOException, SAXException {
    final XmlRpcHttpClientConfig config = (XmlRpcHttpClientConfig) pRequest.getConfig();
    if (isUsingByteArrayOutput(config)) {
      ByteArrayReqWriter reqWriter = new ByteArrayReqWriter(pRequest);
      setContentLength(reqWriter.getContentLength());
      if (isCompressingRequest(config)) {
        return new GzipReqWriter(reqWriter);
      }
      return reqWriter;
    } else {
      return super.newReqWriter(pRequest);
    }
  }
}

代码示例来源:origin: org.sonatype.sisu/sisu-xmlrpc-client

protected ReqWriter newReqWriter(XmlRpcRequest pRequest)
      throws XmlRpcException, IOException, SAXException {
    final XmlRpcHttpClientConfig config = (XmlRpcHttpClientConfig) pRequest.getConfig();
    if (isUsingByteArrayOutput(config)) {
      ByteArrayReqWriter reqWriter = new ByteArrayReqWriter(pRequest);
      setContentLength(reqWriter.getContentLength());
      if (isCompressingRequest(config)) {
        return new GzipReqWriter(reqWriter);
      }
      return reqWriter;
    } else {
      return super.newReqWriter(pRequest);
    }
  }
}

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com