Tabnine Logo
BodyReader.writeTo
Code IndexAdd Tabnine to your IDE (free)

How to use
writeTo
method
in
rawhttp.core.body.BodyReader

Best Java code snippets using rawhttp.core.body.BodyReader.writeTo (Showing top 7 results out of 315)

origin: com.athaydes.rawhttp/rawhttp-core

/**
 * Read the raw HTTP message body, simultaneously writing it to the given output.
 * <p>
 * This method may not validate the full HTTP message before it starts writing it out.
 * To perform a full validation first, call {@link #eager()} to get an eager reader.
 *
 * @param out to write the HTTP body to
 * @throws IOException if an error occurs while writing the message
 * @see BodyReader#writeDecodedTo(OutputStream)
 */
@Override
public void writeTo(OutputStream out) throws IOException {
  writeTo(out, BodyConsumer.DEFAULT_BUFFER_SIZE);
}
origin: renatoathaydes/rawhttp

/**
 * Read the raw HTTP message body, simultaneously writing it to the given output.
 * <p>
 * This method may not validate the full HTTP message before it starts writing it out.
 * To perform a full validation first, call {@link #eager()} to get an eager reader.
 *
 * @param out to write the HTTP body to
 * @throws IOException if an error occurs while writing the message
 * @see BodyReader#writeDecodedTo(OutputStream)
 */
@Override
public void writeTo(OutputStream out) throws IOException {
  writeTo(out, BodyConsumer.DEFAULT_BUFFER_SIZE);
}
origin: com.athaydes.rawhttp/rawhttp-core

@Override
public void writeTo(OutputStream out, int bufferSize) throws IOException {
  markConsumed();
  super.writeTo(out, bufferSize);
}
origin: renatoathaydes/rawhttp

@Override
public void writeTo(OutputStream out, int bufferSize) throws IOException {
  markConsumed();
  super.writeTo(out, bufferSize);
}
origin: com.athaydes.rawhttp/rawhttp-core

/**
 * Write this HTTP message to the given output.
 *
 * @param out        to write this HTTP message to
 * @param bufferSize size of the buffer to use for writing
 * @throws IOException if an error occurs while writing the message
 */
public void writeTo(OutputStream out, int bufferSize) throws IOException {
  getStartLine().writeTo(out);
  getHeaders().writeTo(out);
  Optional<? extends BodyReader> body = getBody();
  if (body.isPresent()) {
    try (BodyReader bodyReader = body.get()) {
      bodyReader.writeTo(out, bufferSize);
    }
  }
}
origin: renatoathaydes/rawhttp

/**
 * Write this HTTP message to the given output.
 *
 * @param out        to write this HTTP message to
 * @param bufferSize size of the buffer to use for writing
 * @throws IOException if an error occurs while writing the message
 */
public void writeTo(OutputStream out, int bufferSize) throws IOException {
  getStartLine().writeTo(out);
  getHeaders().writeTo(out);
  Optional<? extends BodyReader> body = getBody();
  if (body.isPresent()) {
    try (BodyReader bodyReader = body.get()) {
      bodyReader.writeTo(out, bufferSize);
    }
  }
}
origin: renatoathaydes/rawhttp

if (options.printBodyOnly) {
  if (response.getBody().isPresent()) {
    response.getBody().get().writeTo(System.out);
rawhttp.core.bodyBodyReaderwriteTo

Javadoc

Read the raw HTTP message body, simultaneously writing it to the given output.

This method may not validate the full HTTP message before it starts writing it out. To perform a full validation first, call #eager() to get an eager reader.

Popular methods of BodyReader

  • asRawStream
  • asChunkedBodyContents
  • asRawBytes
  • close
  • decodeBody
    Unframe and decode the HTTP message's body.
  • eager
  • writeDecodedTo
    Read the HTTP message body, simultaneously unframing and decoding it, then writing the decoded body
  • asChunkStream
    Get a lazy stream of chunks if the message body is chunked, or empty otherwise. The last chunk is a
  • decodeBodyToString
    Unframe and decode the HTTP message's body, then turn it into a String using the given charset.
  • getLengthIfKnown
  • isChunked
  • isChunked

Popular in Java

  • Running tasks concurrently on multiple threads
  • compareTo (BigDecimal)
  • getApplicationContext (Context)
  • getExternalFilesDir (Context)
  • FileReader (java.io)
    A specialized Reader that reads from a file in the file system. All read requests made by calling me
  • Format (java.text)
    The base class for all formats. This is an abstract base class which specifies the protocol for clas
  • Enumeration (java.util)
    A legacy iteration interface.New code should use Iterator instead. Iterator replaces the enumeration
  • LinkedList (java.util)
    Doubly-linked list implementation of the List and Dequeinterfaces. Implements all optional list oper
  • NoSuchElementException (java.util)
    Thrown when trying to retrieve an element past the end of an Enumeration or Iterator.
  • SortedMap (java.util)
    A map that has its keys ordered. The sorting is according to either the natural ordering of its keys
  • Github Copilot alternatives
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now