Search Options

Results per page
Sort
Preferred Languages
Advance

Results 11 - 20 of 183 for sank (0.23 sec)

  1. android/guava/src/com/google/common/hash/LittleEndianByteArray.java

       *
       * @param sink the output byte array
       * @param offset the offset into the array at which to start writing
       * @param value the value to write
       */
      static void store64(byte[] sink, int offset, long value) {
        // We don't want to assert in production code.
        assert offset >= 0 && offset + 8 <= sink.length;
        // Delegates to the fast (unsafe)version or the fallback.
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Thu Feb 22 17:40:56 GMT 2024
    - 9.7K bytes
    - Viewed (0)
  2. okhttp/src/test/java/okhttp3/ServerTruncatesRequestTest.kt

      private object SlowRequestBody : RequestBody() {
        override fun contentType(): MediaType? = null
    
        override fun writeTo(sink: BufferedSink) {
          for (i in 0 until 50) {
            sink.writeUtf8("abc")
            sink.flush()
            Thread.sleep(100)
          }
          fail("")
        }
      }
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 9.5K bytes
    - Viewed (0)
  3. guava-tests/test/com/google/common/io/ByteSinkTest.java

        assertTrue(sink.wasStreamClosed());
        assertArrayEquals(new byte[] {1, 2, 3, 4}, sink.getBytes());
      }
    
      public void testWrite_bytes() throws IOException {
        assertArrayEquals(new byte[0], sink.getBytes());
        sink.write(bytes);
    
        assertTrue(sink.wasStreamOpened() && sink.wasStreamClosed());
        assertArrayEquals(bytes, sink.getBytes());
      }
    
      public void testWriteFrom_inputStream() throws IOException {
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Wed Sep 06 17:04:31 GMT 2023
    - 3.7K bytes
    - Viewed (0)
  4. okhttp/src/main/kotlin/okhttp3/internal/cache2/Relay.kt

         * reader lock and return the new bytes.
         *
         * ## The file
         *
         * In this case we copy bytes from the file to the [sink].
         *
         * ## The buffer
         *
         * In this case the bytes are immediately copied into [sink] and the number of bytes copied is
         * returned.
         *
         * If upstream would be selected but another thread is already reading upstream this will
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 11.8K bytes
    - Viewed (0)
  5. okhttp/src/test/java/okhttp3/internal/ws/WebSocketWriterTest.kt

      private val serverWriter =
        WebSocketWriter(
          isClient = false,
          sink = data,
          random = random,
          perMessageDeflate = false,
          noContextTakeover = false,
          minimumDeflateSize = 0L,
        )
      private val clientWriter =
        WebSocketWriter(
          isClient = true,
          sink = data,
          random = random,
          perMessageDeflate = false,
          noContextTakeover = false,
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 9.3K bytes
    - Viewed (0)
  6. okhttp-idna-mapping-table/src/main/kotlin/okhttp3/internal/idn/SimpleIdnaMappingTable.kt

        when (mapping.type) {
          TYPE_IGNORED -> Unit
          TYPE_MAPPED, TYPE_DISALLOWED_STD3_MAPPED -> {
            sink.write(mapping.mappedTo)
          }
    
          TYPE_DEVIATION, TYPE_DISALLOWED_STD3_VALID, TYPE_VALID -> {
            sink.writeUtf8CodePoint(codePoint)
          }
    
          TYPE_DISALLOWED -> {
            sink.writeUtf8CodePoint(codePoint)
            result = false
          }
        }
    
        return result
      }
    }
    
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 6.8K bytes
    - Viewed (0)
  7. okhttp/src/main/kotlin/okhttp3/MultipartBody.kt

            byteCount += contentLength
          } else {
            body.writeTo(sink)
          }
    
          sink.write(CRLF)
        }
    
        sink!!.write(DASHDASH)
        sink.write(boundaryByteString)
        sink.write(DASHDASH)
        sink.write(CRLF)
    
        if (countBytes) {
          byteCount += byteCountBuffer!!.size
          byteCountBuffer.clear()
        }
    
        return byteCount
      }
    
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 10.9K bytes
    - Viewed (0)
  8. okhttp-testing-support/src/main/kotlin/okhttp3/okio/LoggingFilesystem.kt

      override fun delete(
        path: Path,
        mustExist: Boolean,
      ) {
        log("delete($path)")
    
        super.delete(path, mustExist)
      }
    
      override fun sink(
        path: Path,
        mustCreate: Boolean,
      ): Sink {
        log("sink($path)")
    
        return super.sink(path, mustCreate)
      }
    
      override fun source(file: Path): Source {
        log("source($file)")
    
        return super.source(file)
      }
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 1.7K bytes
    - Viewed (0)
  9. android/guava/src/com/google/common/collect/ExplicitOrdering.java

        this.rankMap = rankMap;
      }
    
      @Override
      public int compare(T left, T right) {
        return rank(left) - rank(right); // safe because both are nonnegative
      }
    
      private int rank(T value) {
        Integer rank = rankMap.get(value);
        if (rank == null) {
          throw new IncomparableValueException(value);
        }
        return rank;
      }
    
      @Override
      public boolean equals(@CheckForNull Object object) {
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Sun Jun 20 14:22:42 GMT 2021
    - 2K bytes
    - Viewed (0)
  10. okhttp/src/main/kotlin/okhttp3/RequestBody.kt

      /**
       * Returns the number of bytes that will be written to sink in a call to [writeTo],
       * or -1 if that count is unknown.
       */
      @Throws(IOException::class)
      open fun contentLength(): Long = commonContentLength()
    
      /** Writes the content of this request to [sink]. */
      @Throws(IOException::class)
      abstract fun writeTo(sink: BufferedSink)
    
      /**
    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)
Back to top