Search Options

Results per page
Sort
Preferred Languages
Advance

Results 21 - 30 of 76 for sank (0.12 sec)

  1. okhttp/src/main/kotlin/okhttp3/FormBody.kt

      override fun contentLength(): Long = writeOrCountBytes(null, true)
    
      @Throws(IOException::class)
      override fun writeTo(sink: BufferedSink) {
        writeOrCountBytes(sink, false)
      }
    
      /**
       * Either writes this request to [sink] or measures its content length. We have one method
       * do double-duty to make sure the counting and content are consistent, particularly when it comes
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Tue Jan 09 12:33:05 GMT 2024
    - 4.3K bytes
    - Viewed (0)
  2. android/guava-tests/test/com/google/common/hash/FunnelsTest.java

      public void testAsOutputStream() throws Exception {
        PrimitiveSink sink = mock(PrimitiveSink.class);
        OutputStream out = Funnels.asOutputStream(sink);
        byte[] bytes = {1, 2, 3, 4};
        out.write(255);
        out.write(bytes);
        out.write(bytes, 1, 2);
        verify(sink).putByte((byte) 255);
        verify(sink).putBytes(bytes);
        verify(sink).putBytes(bytes, 1, 2);
      }
    
      public void testSerialization() {
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Fri Oct 02 16:24:50 GMT 2020
    - 5.9K bytes
    - Viewed (0)
  3. maven-compat/src/main/java/org/apache/maven/artifact/ArtifactStatus.java

            }
    
            final ArtifactStatus that = (ArtifactStatus) o;
    
            return rank == that.rank;
        }
    
        public int hashCode() {
            return rank;
        }
    
        public String toString() {
            return key;
        }
    
        public int compareTo(ArtifactStatus s) {
            return rank - s.rank;
        }
    Java
    - Registered: Sun May 05 03:35:11 GMT 2024
    - Last Modified: Wed Sep 06 11:28:54 GMT 2023
    - 3K bytes
    - Viewed (0)
  4. okhttp/src/test/java/okhttp3/internal/io/FaultyFileSystem.kt

      }
    
      override fun appendingSink(
        file: Path,
        mustExist: Boolean,
      ): Sink = FaultySink(super.appendingSink(file, mustExist), file)
    
      override fun sink(
        file: Path,
        mustCreate: Boolean,
      ): Sink = FaultySink(super.sink(file, mustCreate), file)
    
      inner class FaultySink(sink: Sink, private val file: Path) : ForwardingSink(sink) {
        override fun write(
          source: Buffer,
          byteCount: Long,
        ) {
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 2.8K bytes
    - Viewed (0)
  5. okhttp-testing-support/src/main/kotlin/okhttp3/UppercaseRequestInterceptor.kt

            @Throws(IOException::class)
            override fun writeTo(sink: BufferedSink) {
              delegate().writeTo(uppercaseSink(sink).buffer())
            }
          }
        return request.newBuilder()
          .method(request.method, uppercaseBody)
          .build()
      }
    
      private fun uppercaseSink(sink: Sink): Sink {
        return object : ForwardingSink(sink) {
          @Throws(IOException::class)
          override fun write(
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 1.9K bytes
    - Viewed (0)
  6. okhttp/src/test/java/okhttp3/CallKotlinTest.kt

          }
    
          override fun writeTo(sink: BufferedSink) {
            sink.writeUtf8("<el")
            sink.flush()
            throw IOException("failed to stream the XML")
          }
        }
    
        class ValidRequestBody : RequestBody() {
          override fun contentType(): MediaType {
            return "application/xml".toMediaType()
          }
    
          override fun writeTo(sink: BufferedSink) {
            sink.writeUtf8("<element/>")
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Sat Jan 20 10:30:28 GMT 2024
    - 8.4K bytes
    - Viewed (0)
  7. okhttp-testing-support/src/main/kotlin/okhttp3/internal/duplex/AsyncRequestBody.kt

      override fun contentType(): MediaType? = null
    
      override fun writeTo(sink: BufferedSink) {
        requestBodySinks.add(sink)
      }
    
      override fun isDuplex(): Boolean = true
    
      @Throws(InterruptedException::class)
      fun takeSink(): BufferedSink {
        return requestBodySinks.poll(5, SECONDS) ?: throw AssertionError("no sink to take")
      }
    
      fun assertNoMoreSinks() {
        assertTrue(requestBodySinks.isEmpty())
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Wed Dec 20 23:27:07 GMT 2023
    - 1.5K bytes
    - Viewed (0)
  8. android/guava-tests/test/com/google/common/io/SourceSinkFactory.java

     * factory specifies what content should be expected to be read from a source or contained in a sink
     * given the content data that was used to create the source or that was written to the sink.
     *
     * <p>A single {@code SourceSinkFactory} implementation generally corresponds to one specific way of
     * creating a source or sink, such as {@link Files#asByteSource(File)}. Implementations of {@code
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Mon Dec 04 17:37:03 GMT 2017
    - 3K bytes
    - Viewed (0)
  9. 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 05 12:43:09 GMT 2024
    - Last Modified: Sun Jun 20 14:22:42 GMT 2021
    - 2K bytes
    - Viewed (0)
  10. android/guava-tests/test/com/google/common/io/CharSinkTester.java

      private CharSink sink;
    
      public CharSinkTester(
          CharSinkFactory factory, String string, String suiteName, String caseDesc, Method method) {
        super(factory, string, suiteName, caseDesc, method);
        this.lines = getLines(string);
        this.expectedLines = getLines(expected);
      }
    
      @Override
      protected void setUp() throws Exception {
        this.sink = factory.createSink();
      }
    
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Mon Oct 10 19:45:10 GMT 2022
    - 4K bytes
    - Viewed (0)
Back to top