Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 43 for writeAll (0.19 sec)

  1. okhttp/src/test/java/okhttp3/internal/http2/Http2Test.kt

        writeMedium(frame, headerBytes.size.toInt())
        frame.writeByte(Http2.TYPE_HEADERS)
        frame.writeByte(FLAG_END_HEADERS or FLAG_END_STREAM)
        frame.writeInt(expectedStreamId and 0x7fffffff)
        frame.writeAll(headerBytes)
    
        // Check writer sends the same bytes.
        assertThat(sendHeaderFrames(true, sentHeaders)).isEqualTo(frame)
        reader.nextFrame(
          requireSettings = false,
          object : BaseTestHandler() {
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 28.1K bytes
    - Viewed (0)
  2. okhttp/src/main/kotlin/okhttp3/RequestBody.kt

            override fun isOneShot(): Boolean = true
    
            override fun writeTo(sink: BufferedSink) {
              FileInputStream(this@toRequestBody).use {
                sink.buffer.writeAll(it.source())
              }
            }
          }
        }
    
        /** Returns a new request body that transmits this. */
        @JvmOverloads
        @JvmStatic
        @JvmName("create")
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Thu Jan 25 14:41:37 GMT 2024
    - 9.6K bytes
    - Viewed (0)
  3. cmd/storage-rest-common.go

    )
    
    const (
    	storageRESTMethodHealth = "/health"
    
    	storageRESTMethodAppendFile     = "/appendfile"
    	storageRESTMethodCreateFile     = "/createfile"
    	storageRESTMethodWriteAll       = "/writeall"
    	storageRESTMethodReadVersion    = "/readversion"
    	storageRESTMethodReadXL         = "/readxl"
    	storageRESTMethodReadAll        = "/readall"
    	storageRESTMethodReadFile       = "/readfile"
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Mon Feb 12 21:00:20 GMT 2024
    - 2.9K bytes
    - Viewed (0)
  4. okhttp/src/main/kotlin/okhttp3/internal/ws/MessageInflater.kt

      @Throws(IOException::class)
      fun inflate(buffer: Buffer) {
        require(deflatedBytes.size == 0L)
    
        if (noContextTakeover) {
          inflater.reset()
        }
    
        deflatedBytes.writeAll(buffer)
        deflatedBytes.writeInt(OCTETS_TO_ADD_BEFORE_INFLATION)
    
        val totalBytesToRead = inflater.bytesRead + deflatedBytes.size
    
        // We cannot read all, as the source does not close.
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 1.8K bytes
    - Viewed (0)
  5. cmd/storage-interface.go

    	CleanAbandonedData(ctx context.Context, volume string, path string) error
    
    	// Write all data, syncs the data to disk.
    	// Should be used for smaller payloads.
    	WriteAll(ctx context.Context, volume string, path string, b []byte) (err error)
    
    	// Read all.
    	ReadAll(ctx context.Context, volume string, path string) (buf []byte, err error)
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Tue Apr 23 17:15:52 GMT 2024
    - 4.9K bytes
    - Viewed (0)
  6. cmd/naughty-disk_test.go

    		return FileInfo{}, err
    	}
    	return d.disk.ReadVersion(ctx, origvolume, volume, path, versionID, opts)
    }
    
    func (d *naughtyDisk) WriteAll(ctx context.Context, volume string, path string, b []byte) (err error) {
    	if err := d.calcError(); err != nil {
    		return err
    	}
    	return d.disk.WriteAll(ctx, volume, path, b)
    }
    
    func (d *naughtyDisk) ReadAll(ctx context.Context, volume string, path string) (buf []byte, err error) {
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Tue Apr 23 17:15:52 GMT 2024
    - 9.3K bytes
    - Viewed (0)
  7. samples/guide/src/main/java/okhttp3/recipes/PostStreamingWithPipe.java

          return sink;
        }
    
        @Override public MediaType contentType() {
          return MEDIA_TYPE_MARKDOWN;
        }
    
        @Override public void writeTo(BufferedSink sink) throws IOException {
          sink.writeAll(pipe.source());
        }
      }
    
      public static void main(String... args) throws Exception {
        new PostStreamingWithPipe().run();
      }
    Java
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Fri Jul 06 03:18:15 GMT 2018
    - 3.1K bytes
    - Viewed (0)
  8. okhttp-logging-interceptor/src/main/kotlin/okhttp3/logging/HttpLoggingInterceptor.kt

                gzippedLength = buffer.size
                GzipSource(buffer).use { gzippedResponseBody ->
                  buffer = Buffer()
                  buffer.writeAll(gzippedResponseBody)
                }
              }
    
              val charset: Charset = requestBody.contentType().charsetOrUtf8()
    
              logger.log("")
              if (!buffer.isProbablyUtf8()) {
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Sat Apr 06 09:14:38 GMT 2024
    - 11.2K bytes
    - Viewed (1)
  9. mockwebserver/src/test/java/mockwebserver3/internal/http2/Http2Server.kt

          responseHeaders = responseHeaders,
          outFinished = false,
          flushHeaders = false,
        )
        file.source().use { source ->
          stream.getSink().buffer().use { sink ->
            sink.writeAll(source)
          }
        }
      }
    
      private fun contentType(file: File): String {
        return when {
          file.name.endsWith(".css") -> "text/css"
          file.name.endsWith(".gif") -> "image/gif"
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 6.1K bytes
    - Viewed (0)
  10. okhttp-tls/src/main/kotlin/okhttp3/tls/internal/der/DerWriter.kt

          for (shift in (lengthByteCount - 1) * 8 downTo 0 step 8) {
            sink.writeByte((length shr shift).toInt())
          }
        }
    
        // Write the payload.
        sink.writeAll(content)
      }
    
      /**
       * Execute [block] with a new namespace for type hints. Type hints from the enclosing type are no
       * longer usable by the current type's members.
       */
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 5.7K bytes
    - Viewed (0)
Back to top