Search Options

Results per page
Sort
Preferred Languages
Advance

Results 41 - 50 of 72 for byteCount (0.06 sec)

  1. okhttp-tls/src/main/kotlin/okhttp3/tls/internal/der/DerWriter.kt

      /** Used for tags and subidentifiers. */
      private fun writeVariableLengthLong(v: Long) {
        val sink = sink()
        val bitCount = 64 - java.lang.Long.numberOfLeadingZeros(v)
        val byteCount = (bitCount + 6) / 7
        for (shift in (byteCount - 1) * 7 downTo 0 step 7) {
          val lastBit = if (shift == 0) 0 else 0b1000_0000
          sink.writeByte(((v shr shift) and 0b0111_1111).toInt() or lastBit)
        }
      }
    
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Mon Jan 08 01:13:22 UTC 2024
    - 5.7K bytes
    - Viewed (0)
  2. samples/guide/src/main/java/okhttp3/recipes/Progress.java

        private Source source(Source source) {
          return new ForwardingSource(source) {
            long totalBytesRead = 0L;
    
            @Override public long read(Buffer sink, long byteCount) throws IOException {
              long bytesRead = super.read(sink, byteCount);
              // read() returns the number of bytes read, or -1 if this source is exhausted.
              totalBytesRead += bytesRead != -1 ? bytesRead : 0;
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Sat Jan 12 03:31:36 UTC 2019
    - 3.9K bytes
    - Viewed (0)
  3. okhttp/src/test/java/okhttp3/ResponseBodyTest.kt

        assertThat(body.bytes()).isEqualTo(text)
      }
    }
    
    abstract class ForwardingSource(
      val delegate: Source,
    ) : Source {
      override fun read(
        sink: Buffer,
        byteCount: Long,
      ): Long = delegate.read(sink, byteCount)
    
      override fun timeout() = delegate.timeout()
    
      override fun close() = delegate.close()
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Mon Jan 08 01:13:22 UTC 2024
    - 4K bytes
    - Viewed (0)
  4. okhttp/src/main/kotlin/okhttp3/MultipartBody.kt

          sink.write(CRLF)
    
          if (countBytes) {
            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()
        }
    
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Mon Jan 08 01:13:22 UTC 2024
    - 10.9K bytes
    - Viewed (0)
  5. src/main/java/jcifs/smb1/smb1/SmbComTreeConnectAndXResponse.java

            // win98 observed not returning nativeFileSystem
    /* Problems here with iSeries returning ASCII even though useUnicode = true
     * Fortunately we don't really need nativeFileSystem for anything.
            if( byteCount > bufferIndex - start ) {
                nativeFileSystem = readString( buffer, bufferIndex );
                bufferIndex += stringWireLength( nativeFileSystem, bufferIndex );
            }
    */
    
            return bufferIndex - start;
    Registered: Sun Nov 03 00:10:13 UTC 2024
    - Last Modified: Fri Mar 22 21:10:40 UTC 2019
    - 2.9K bytes
    - Viewed (0)
  6. okhttp/src/main/kotlin/okhttp3/internal/cache2/Relay.kt

              val bytesToRead = minOf(byteCount, upstreamPos - sourcePos)
              buffer.copyTo(sink, sourcePos - bufferPos, bytesToRead)
              sourcePos += bytesToRead
              return bytesToRead
            }
    
          // Read from the file.
          if (source == SOURCE_FILE) {
            val bytesToRead = minOf(byteCount, upstreamPos - sourcePos)
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Mon Jan 08 01:13:22 UTC 2024
    - 11.8K bytes
    - Viewed (0)
  7. src/main/java/jcifs/internal/smb2/ServerMessageBlock2.java

        public int encode ( byte[] dst, int dstIndex ) {
            int start = this.headerStart = dstIndex;
            dstIndex += writeHeaderWireFormat(dst, dstIndex);
    
            this.byteCount = writeBytesWireFormat(dst, dstIndex);
            dstIndex += this.byteCount;
            dstIndex += pad8(dstIndex);
    
            this.length = dstIndex - start;
    
            int len = this.length;
    
            if ( this.next != null ) {
    Registered: Sun Nov 03 00:10:13 UTC 2024
    - Last Modified: Sun Sep 30 10:47:31 UTC 2018
    - 19.9K bytes
    - Viewed (0)
  8. okhttp/src/main/kotlin/okhttp3/internal/cache/CacheInterceptor.kt

            private var cacheRequestClosed = false
    
            @Throws(IOException::class)
            override fun read(
              sink: Buffer,
              byteCount: Long,
            ): Long {
              val bytesRead: Long
              try {
                bytesRead = source.read(sink, byteCount)
              } catch (e: IOException) {
                if (!cacheRequestClosed) {
                  cacheRequestClosed = true
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Fri Mar 22 07:09:21 UTC 2024
    - 10.2K bytes
    - Viewed (0)
  9. samples/guide/src/main/java/okhttp3/recipes/PrintEventsNonConcurrent.java

          printEvent("requestHeadersEnd");
        }
    
        @Override public void requestBodyStart(Call call) {
          printEvent("requestBodyStart");
        }
    
        @Override public void requestBodyEnd(Call call, long byteCount) {
          printEvent("requestBodyEnd");
        }
    
        @Override public void requestFailed(Call call, IOException ioe) {
          printEvent("requestFailed");
        }
    
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Sun Feb 16 23:20:49 UTC 2020
    - 5.3K bytes
    - Viewed (0)
  10. samples/guide/src/main/java/okhttp3/recipes/PrintEvents.java

          printEvent("requestHeadersEnd");
        }
    
        @Override public void requestBodyStart(Call call) {
          printEvent("requestBodyStart");
        }
    
        @Override public void requestBodyEnd(Call call, long byteCount) {
          printEvent("requestBodyEnd");
        }
    
        @Override public void requestFailed(Call call, IOException ioe) {
          printEvent("requestFailed");
        }
    
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Sun Feb 16 23:20:49 UTC 2020
    - 6.1K bytes
    - Viewed (0)
Back to top