Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 37 for WriteTo (0.23 sec)

  1. okhttp/src/test/java/okhttp3/MultipartBodyTest.kt

        val buffer = Buffer()
        body.writeTo(buffer)
        assertThat(buffer.readUtf8()).isEqualTo(expected)
      }
    
      @Test
      fun streamingPartHasNoLength() {
        class StreamingBody(private val body: String) : RequestBody() {
          override fun contentType(): MediaType? {
            return null
          }
    
          @Throws(IOException::class)
          override fun writeTo(sink: BufferedSink) {
            sink.writeUtf8(body)
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 10.4K bytes
    - Viewed (0)
  2. 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)
  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. cmd/admin-handlers-config-kv.go

    	if err != nil {
    		writeErrorResponseJSON(ctx, w, toAdminAPIErr(ctx, err), r.URL)
    		return
    	}
    
    	var s strings.Builder
    	for _, subSysConfig := range subSysConfigs {
    		subSysConfig.WriteTo(&s, false)
    	}
    
    	password := cred.SecretKey
    	econfigData, err := madmin.EncryptData(password, []byte(s.String()))
    	if err != nil {
    		writeErrorResponseJSON(ctx, w, toAdminAPIErr(ctx, err), r.URL)
    		return
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Thu Apr 04 12:04:40 GMT 2024
    - 15.7K bytes
    - Viewed (0)
  5. android/guava/src/com/google/common/math/PairedStats.java

       * versions.
       */
      public byte[] toByteArray() {
        ByteBuffer buffer = ByteBuffer.allocate(BYTES).order(ByteOrder.LITTLE_ENDIAN);
        xStats.writeTo(buffer);
        yStats.writeTo(buffer);
        buffer.putDouble(sumOfProductsOfDeltas);
        return buffer.array();
      }
    
      /**
       * Creates a {@link PairedStats} instance from the given byte representation which was obtained by
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Fri May 12 17:02:53 GMT 2023
    - 12.6K bytes
    - Viewed (0)
  6. android/guava/src/com/google/common/hash/BloomFilter.java

     * has not actually been put in the {@code BloomFilter}.
     *
     * <p>Bloom filters are serializable. They also support a more compact serial representation via the
     * {@link #writeTo} and {@link #readFrom} methods. Both serialized forms will continue to be
     * supported by future versions of this library. However, serial forms generated by newer versions
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Mon Apr 01 16:15:01 GMT 2024
    - 23.1K bytes
    - Viewed (0)
  7. okhttp/src/test/java/okhttp3/DuplexTest.kt

        override fun contentType() = delegate.contentType()
    
        override fun isDuplex() = true
    
        override fun writeTo(sink: BufferedSink) {
          executorService.schedule({
            try {
              delegate.writeTo(sink)
              sink.close()
            } catch (e: IOException) {
              throw RuntimeException(e)
            }
          }, delayMillis, TimeUnit.MILLISECONDS)
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Sat Jan 20 10:30:28 GMT 2024
    - 23.9K bytes
    - Viewed (0)
  8. okhttp/src/main/kotlin/okhttp3/Cache.kt

          return null
        }
    
        val entry = Entry(response)
        var editor: DiskLruCache.Editor? = null
        try {
          editor = cache.edit(key(response.request.url)) ?: return null
          entry.writeTo(editor)
          return RealCacheRequest(editor)
        } catch (_: IOException) {
          abortQuietly(editor)
          return null
        }
      }
    
      @Throws(IOException::class)
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Wed Apr 10 19:46:48 GMT 2024
    - 26.8K bytes
    - Viewed (0)
  9. cmd/utils.go

    			runtime.GC()
    			var buf bytes.Buffer
    			err := pprof.Lookup("heap").WriteTo(&buf, 0)
    			return buf.Bytes(), err
    		}
    	case madmin.ProfilerBlock:
    		runtime.SetBlockProfileRate(100)
    		prof.stopFn = func() ([]byte, error) {
    			var buf bytes.Buffer
    			err := pprof.Lookup("block").WriteTo(&buf, 0)
    			runtime.SetBlockProfileRate(0)
    			return buf.Bytes(), err
    		}
    	case madmin.ProfilerMutex:
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Wed Apr 24 04:08:47 GMT 2024
    - 31.3K bytes
    - Viewed (0)
  10. okhttp/src/test/java/okhttp3/internal/http/CancelTest.kt

                  override fun contentType(): MediaType? {
                    return null
                  }
    
                  @Throws(
                    IOException::class,
                  )
                  override fun writeTo(sink: BufferedSink) {
                    for (i in 0..9) {
                      sink.writeByte(0)
                      sink.flush()
                      sleep(100)
                    }
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Sat Jan 20 10:30:28 GMT 2024
    - 9.9K bytes
    - Viewed (0)
Back to top