Search Options

Results per page
Sort
Preferred Languages
Advance

Results 11 - 20 of 43 for writeAll (0.18 sec)

  1. 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 May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 6.1K bytes
    - Viewed (0)
  2. 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 May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 5.7K bytes
    - Viewed (0)
  3. samples/static-server/src/main/java/okhttp3/sample/SampleServer.java

            .setBody(fileToBytes(file))
            .addHeader("content-type: " + contentType(path));
      }
    
      private Buffer fileToBytes(File file) throws IOException {
        Buffer result = new Buffer();
        result.writeAll(Okio.source(file));
        return result;
      }
    
      private String contentType(String path) {
        if (path.endsWith(".png")) return "image/png";
        if (path.endsWith(".jpg")) return "image/jpeg";
    Java
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Wed Jan 02 02:50:44 GMT 2019
    - 4.7K bytes
    - Viewed (0)
  4. okhttp/src/test/java/okhttp3/internal/publicsuffix/PublicSuffixListGenerator.kt

      private suspend fun updateLocalFile() =
        withContext(Dispatchers.IO) {
          client.newCall(request).executeAsync().use { response ->
            fileSystem.sink(publicSuffixListDotDat).buffer().use { sink ->
              sink.writeAll(response.body.source())
            }
          }
        }
    
      private suspend fun readImportResults(): ImportResults =
        withContext(Dispatchers.IO) {
          val sortedRules: SortedSet<ByteString> = TreeSet()
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Thu Apr 18 01:24:38 GMT 2024
    - 6K bytes
    - Viewed (0)
  5. cmd/erasure-healing_test.go

    		Recursive: false,
    		Immediate: false,
    	})
    	if err != nil {
    		t.Errorf("Failure during deleting part.1 - %v", err)
    	}
    
    	err = firstDisk.WriteAll(context.Background(), bucket, pathJoin(object, fi.DataDir, "part.1"), []byte{})
    	if err != nil {
    		t.Errorf("Failure during creating part.1 - %v", err)
    	}
    
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Wed Mar 27 15:10:40 GMT 2024
    - 47.6K bytes
    - Viewed (0)
  6. cmd/storage-rest-client.go

    		FilePath:       path,
    		ForceDelMarker: forceDelMarker,
    		FI:             fi,
    		Opts:           opts,
    	})
    	return toStorageErr(err)
    }
    
    // WriteAll - write all data to a file.
    func (client *storageRESTClient) WriteAll(ctx context.Context, volume string, path string, b []byte) error {
    	_, err := storageWriteAllRPC.Call(ctx, client.gridConn, &WriteAllHandlerParams{
    		DiskID:   *client.diskID.Load(),
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Sun Apr 28 17:53:50 GMT 2024
    - 26.1K bytes
    - Viewed (0)
  7. cmd/background-newdisks-heal-ops.go

    			}
    		}
    	}
    	h.LastUpdate = time.Now().UTC()
    	htrackerBytes, err := h.MarshalMsg(nil)
    	h.mu.Unlock()
    	if err != nil {
    		return err
    	}
    	globalBackgroundHealState.updateHealStatus(h)
    	return h.disk.WriteAll(ctx, minioMetaBucket,
    		pathJoin(bucketMetaPrefix, healingTrackerFilename),
    		htrackerBytes)
    }
    
    // delete the tracker on disk.
    func (h *healingTracker) delete(ctx context.Context) error {
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Thu Apr 04 12:04:40 GMT 2024
    - 14.7K bytes
    - Viewed (0)
  8. okhttp/src/main/kotlin/okhttp3/internal/http2/Http2Stream.kt

            ******@****.***ck {
              if (closed) {
                receiveBuffer.clear()
              } else {
                val wasEmpty = readBuffer.size == 0L
                readBuffer.writeAll(receiveBuffer)
                if (wasEmpty) {
                  condition.signalAll()
                }
              }
            }
          }
    
          // Update the connection flow control, as this is a shared resource.
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Sat Apr 20 17:03:43 GMT 2024
    - 23.2K bytes
    - Viewed (1)
  9. cmd/format-erasure.go

    	defer disk.Delete(context.TODO(), minioMetaBucket, tmpFormat, DeleteOptions{
    		Recursive: false,
    		Immediate: false,
    	})
    
    	// write to unique file.
    	if err = disk.WriteAll(context.TODO(), minioMetaBucket, tmpFormat, formatData); err != nil {
    		return err
    	}
    
    	// Rename file `uuid.json` --> `format.json`.
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Fri May 03 15:54:03 GMT 2024
    - 23.2K bytes
    - Viewed (0)
  10. mockwebserver/src/main/kotlin/mockwebserver3/MockWebServer.kt

                  expectedByteCount = contentLengthString?.toLong() ?: Long.MAX_VALUE,
                  socket = socket,
                ).buffer()
              requestBodySink.use {
                it.writeAll(stream.getSource())
              }
            } catch (e: IOException) {
              exception = e
            }
          }
    
          return RecordedRequest(
            requestLine = requestLine,
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Sun Mar 31 17:16:15 GMT 2024
    - 37.4K bytes
    - Viewed (0)
Back to top