Search Options

Display Count
Sort
Preferred Language
Advanced Search

Results 1 - 3 of 3 for WriteAll (0.14 seconds)

  1. 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(16L)) {
    Created: Fri Apr 03 11:42:14 GMT 2026
    - Last Modified: Fri Nov 07 02:57:33 GMT 2025
    - 11.5K bytes
    - Click Count (0)
  2. 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";
    Created: Fri Apr 03 11:42:14 GMT 2026
    - Last Modified: Wed Mar 11 02:37:00 GMT 2026
    - 5.3K bytes
    - Click Count (0)
  3. mockwebserver/src/main/kotlin/mockwebserver3/MockWebServer.kt

                    socket = socket,
                    stream = stream,
                  ).buffer()
              requestBodySink.use {
                it.writeAll(stream.source)
              }
            } catch (e: IOException) {
              exception = e
            } finally {
              bodyByteString = body.readByteString()
            }
          }
    
    Created: Fri Apr 03 11:42:14 GMT 2026
    - Last Modified: Tue Jan 27 09:00:39 GMT 2026
    - 40.3K bytes
    - Click Count (0)
Back to Top