Search Options

Results per page
Sort
Preferred Languages
Advance

Results 11 - 20 of 74 for WriteTo (0.18 sec)

  1. src/archive/tar/reader.go

    	if err != nil && err != io.EOF {
    		tr.err = err
    	}
    	return n, err
    }
    
    // writeTo writes the content of the current file to w.
    // The bytes written matches the number of remaining bytes in the current file.
    //
    // If the current file is sparse and w is an io.WriteSeeker,
    // then writeTo uses Seek to skip past holes defined in Header.SparseHoles,
    // assuming that skipped regions are filled with NULs.
    Go
    - Registered: Tue Apr 23 11:13:09 GMT 2024
    - Last Modified: Fri Mar 08 01:59:14 GMT 2024
    - 26.8K bytes
    - Viewed (0)
  2. samples/guide/src/main/java/okhttp3/recipes/RequestBodyCompression.java

            @Override public long contentLength() {
              return -1; // We don't know the compressed length in advance!
            }
    
            @Override public void writeTo(BufferedSink sink) throws IOException {
              BufferedSink gzipSink = Okio.buffer(new GzipSink(sink));
              body.writeTo(gzipSink);
              gzipSink.close();
            }
          };
        }
      }
    Java
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Sat May 25 18:02:55 GMT 2019
    - 3.8K bytes
    - Viewed (0)
  3. src/bufio/bufio.go

    		buf.Write(fb)
    	}
    	buf.Write(frag)
    	return buf.String(), err
    }
    
    // WriteTo implements io.WriterTo.
    // This may make multiple calls to the [Reader.Read] method of the underlying [Reader].
    // If the underlying reader supports the [Reader.WriteTo] method,
    // this calls the underlying [Reader.WriteTo] without buffering.
    func (b *Reader) WriteTo(w io.Writer) (n int64, err error) {
    	b.lastByte = -1
    	b.lastRuneSize = -1
    
    Go
    - Registered: Tue Apr 23 11:13:09 GMT 2024
    - Last Modified: Thu Oct 12 14:39:08 GMT 2023
    - 21.8K bytes
    - Viewed (0)
  4. samples/guide/src/main/java/okhttp3/recipes/PostStreaming.java

      public void run() throws Exception {
        RequestBody requestBody = new RequestBody() {
          @Override public MediaType contentType() {
            return MEDIA_TYPE_MARKDOWN;
          }
    
          @Override public void writeTo(BufferedSink sink) throws IOException {
            sink.writeUtf8("Numbers\n");
            sink.writeUtf8("-------\n");
            for (int i = 2; i <= 997; i++) {
              sink.writeUtf8(String.format(" * %s = %s\n", i, factor(i)));
    Java
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Fri Jul 06 03:18:15 GMT 2018
    - 2.1K bytes
    - Viewed (0)
  5. okhttp/src/main/kotlin/okhttp3/internal/http/CallServerInterceptor.kt

                requestBody.writeTo(bufferedRequestBody)
              } else {
                // Write the request body if the "Expect: 100-continue" expectation was met.
                val bufferedRequestBody = exchange.createRequestBody(request, false).buffer()
                requestBody.writeTo(bufferedRequestBody)
                bufferedRequestBody.close()
              }
            } else {
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 6.3K bytes
    - Viewed (1)
  6. mockwebserver/src/main/kotlin/mockwebserver3/internal/BufferMockResponseBody.kt

      return BufferMockResponseBody(defensiveCopy)
    }
    
    internal class BufferMockResponseBody(
      val buffer: Buffer,
    ) : MockResponseBody {
      override val contentLength = buffer.size
    
      override fun writeTo(sink: BufferedSink) {
        buffer.copyTo(sink.buffer)
        sink.emitCompleteSegments()
      }
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Sun Jan 07 16:05:34 GMT 2024
    - 1.1K bytes
    - Viewed (0)
  7. mockwebserver/src/main/kotlin/mockwebserver3/MockResponseBody.kt

     * called by readers.
     */
    @ExperimentalOkHttpApi
    interface MockResponseBody {
      /** The length of this response in bytes, or -1 if unknown. */
      val contentLength: Long
    
      @Throws(IOException::class)
      fun writeTo(sink: BufferedSink)
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Tue Jan 23 14:31:42 GMT 2024
    - 1.1K bytes
    - Viewed (0)
  8. okhttp-testing-support/src/main/kotlin/okhttp3/internal/duplex/AsyncRequestBody.kt

    class AsyncRequestBody : RequestBody() {
      private val requestBodySinks: BlockingQueue<BufferedSink> = LinkedBlockingQueue()
    
      override fun contentType(): MediaType? = null
    
      override fun writeTo(sink: BufferedSink) {
        requestBodySinks.add(sink)
      }
    
      override fun isDuplex(): Boolean = true
    
      @Throws(InterruptedException::class)
      fun takeSink(): BufferedSink {
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Wed Dec 20 23:27:07 GMT 2023
    - 1.5K bytes
    - Viewed (0)
  9. api/go1.22.txt

    pkg math/rand/v2, type Source interface { Uint64 } #61716
    pkg math/rand/v2, type Source interface, Uint64() uint64 #61716
    pkg math/rand/v2, type Zipf struct #61716
    pkg net, method (*TCPConn) WriteTo(io.Writer) (int64, error) #58808
    pkg net/http, func FileServerFS(fs.FS) Handler #51971
    pkg net/http, func NewFileTransportFS(fs.FS) RoundTripper #51971
    pkg net/http, func ServeFileFS(ResponseWriter, *Request, fs.FS, string) #51971
    Plain Text
    - Registered: Tue Apr 23 11:13:09 GMT 2024
    - Last Modified: Wed Jan 24 20:54:27 GMT 2024
    - 7.7K bytes
    - Viewed (0)
  10. okhttp/src/test/java/okhttp3/CallKotlinTest.kt

          }
    
          override fun writeTo(sink: BufferedSink) {
            sink.writeUtf8("<el")
            sink.flush()
            throw IOException("failed to stream the XML")
          }
        }
    
        class ValidRequestBody : RequestBody() {
          override fun contentType(): MediaType {
            return "application/xml".toMediaType()
          }
    
          override fun writeTo(sink: BufferedSink) {
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Sat Jan 20 10:30:28 GMT 2024
    - 8.4K bytes
    - Viewed (0)
Back to top