com.github.kevinsawicki.http.HttpRequest.copy()方法的使用及代码示例

x33g5p2x  于2022-01-20 转载在 其他  
字(5.5k)|赞(0)|评价(0)|浏览(73)

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

HttpRequest.copy介绍

[英]Copy from input stream to output stream
[中]从输入流复制到输出流

代码示例

代码示例来源:origin: com.github.kevinsawicki/http-request

@Override
 protected HttpRequest run() throws IOException {
  return copy(input, writer);
 }
}.call();

代码示例来源:origin: lkorth/httpebble-android

@Override
  public HttpRequest run() throws IOException {
    return copy(reader, writer);
  }
}.call();

代码示例来源:origin: tcking/GiraffePlayer2

@Override
  public HttpRequest run() throws IOException {
    return copy(reader, writer);
  }
}.call();

代码示例来源:origin: com.github.kevinsawicki/http-request

@Override
 public HttpRequest run() throws IOException {
  return copy(reader, writer);
 }
}.call();

代码示例来源:origin: com.restfuse/com.eclipsesource.restfuse

@Override
 protected HttpRequest run() throws IOException {
  return copy(input, writer);
 }
}.call();

代码示例来源:origin: tcking/GiraffePlayer2

@Override
  protected HttpRequest run() throws IOException {
    return copy(input, writer);
  }
}.call();

代码示例来源:origin: com.restfuse/com.eclipsesource.restfuse

@Override
 public HttpRequest run() throws IOException {
  return copy(reader, writer);
 }
}.call();

代码示例来源:origin: lkorth/httpebble-android

@Override
  protected HttpRequest run() throws IOException {
    return copy(input, writer);
  }
}.call();

代码示例来源:origin: lkorth/httpebble-android

/**
 * Stream response to given output stream
 *
 * @param output
 * @return this request
 * @throws HttpRequestException
 */
public HttpRequest receive(final OutputStream output)
    throws HttpRequestException {
  try {
    return copy(buffer(), output);
  } catch (IOException e) {
    throw new HttpRequestException(e);
  }
}

代码示例来源:origin: com.restfuse/com.eclipsesource.restfuse

/**
 * Stream response to given output stream
 *
 * @param output
 * @return this request
 * @throws HttpRequestException
 */
public HttpRequest receive(final OutputStream output)
  throws HttpRequestException {
 try {
  return copy(buffer(), output);
 } catch (IOException e) {
  throw new HttpRequestException(e);
 }
}

代码示例来源:origin: com.github.kevinsawicki/http-request

/**
 * Stream response to given output stream
 *
 * @param output
 * @return this request
 * @throws HttpRequestException
 */
public HttpRequest receive(final OutputStream output)
  throws HttpRequestException {
 try {
  return copy(buffer(), output);
 } catch (IOException e) {
  throw new HttpRequestException(e);
 }
}

代码示例来源:origin: tcking/GiraffePlayer2

/**
 * Stream response to given output stream
 *
 * @param output
 * @return this request
 * @throws HttpRequestException
 */
public HttpRequest receive(final OutputStream output)
    throws HttpRequestException {
  try {
    return copy(buffer(), output);
  } catch (IOException e) {
    throw new HttpRequestException(e);
  }
}

代码示例来源:origin: com.github.kevinsawicki/http-request

/**
 * Write stream to request body
 * <p>
 * The given stream will be closed once sending completes
 *
 * @param input
 * @return this request
 * @throws HttpRequestException
 */
public HttpRequest send(final InputStream input) throws HttpRequestException {
 try {
  openOutput();
  copy(input, output);
 } catch (IOException e) {
  throw new HttpRequestException(e);
 }
 return this;
}

代码示例来源:origin: com.github.kevinsawicki/http-request

/**
 * Get response as byte array
 *
 * @return byte array
 * @throws HttpRequestException
 */
public byte[] bytes() throws HttpRequestException {
 final ByteArrayOutputStream output = byteStream();
 try {
  copy(buffer(), output);
 } catch (IOException e) {
  throw new HttpRequestException(e);
 }
 return output.toByteArray();
}

代码示例来源:origin: com.restfuse/com.eclipsesource.restfuse

/**
 * Write stream to request body
 * <p>
 * The given stream will be closed once sending completes
 *
 * @param input
 * @return this request
 * @throws HttpRequestException
 */
public HttpRequest send(final InputStream input) throws HttpRequestException {
 try {
  openOutput();
  copy(input, output);
 } catch (IOException e) {
  throw new HttpRequestException(e);
 }
 return this;
}

代码示例来源:origin: lkorth/httpebble-android

/**
 * Write stream to request body
 * <p/>
 * The given stream will be closed once sending completes
 *
 * @param input
 * @return this request
 * @throws HttpRequestException
 */
public HttpRequest send(final InputStream input) throws HttpRequestException {
  try {
    openOutput();
    copy(input, output);
  } catch (IOException e) {
    throw new HttpRequestException(e);
  }
  return this;
}

代码示例来源:origin: tcking/GiraffePlayer2

/**
 * Get response as byte array
 *
 * @return byte array
 * @throws HttpRequestException
 */
public byte[] bytes() throws HttpRequestException {
  final ByteArrayOutputStream output = byteStream();
  try {
    copy(buffer(), output);
  } catch (IOException e) {
    throw new HttpRequestException(e);
  }
  return output.toByteArray();
}

代码示例来源:origin: com.restfuse/com.eclipsesource.restfuse

/**
 * Get response as byte array
 *
 * @return byte array
 * @throws HttpRequestException
 */
public byte[] bytes() throws HttpRequestException {
 final ByteArrayOutputStream output = byteStream();
 try {
  copy(buffer(), output);
 } catch (IOException e) {
  throw new HttpRequestException(e);
 }
 return output.toByteArray();
}

代码示例来源:origin: lkorth/httpebble-android

/**
 * Get response as byte array
 *
 * @return byte array
 * @throws HttpRequestException
 */
public byte[] bytes() throws HttpRequestException {
  final ByteArrayOutputStream output = byteStream();
  try {
    copy(buffer(), output);
  } catch (IOException e) {
    throw new HttpRequestException(e);
  }
  return output.toByteArray();
}

代码示例来源:origin: com.restfuse/com.eclipsesource.restfuse

/**
 * Get response as {@link String} in given character set
 * <p>
 * This will fall back to using the UTF-8 character set if the given charset
 * is null
 *
 * @param charset
 * @return string
 * @throws HttpRequestException
 */
public String body(final String charset) throws HttpRequestException {
 final ByteArrayOutputStream output = byteStream();
 try {
  copy(buffer(), output);
  return output.toString(getValidCharset(charset));
 } catch (IOException e) {
  throw new HttpRequestException(e);
 }
}

相关文章

微信公众号

最新文章

更多

HttpRequest类方法