Search Options

Results per page
Sort
Preferred Languages
Advance

Results 11 - 20 of 1,115 for Buffer (0.22 sec)

  1. src/bufio/bufio.go

    	b.n = 0
    	return nil
    }
    
    // Available returns how many bytes are unused in the buffer.
    func (b *Writer) Available() int { return len(b.buf) - b.n }
    
    // AvailableBuffer returns an empty buffer with b.Available() capacity.
    // This buffer is intended to be appended to and
    // passed to an immediately succeeding [Writer.Write] call.
    // The buffer is only valid until the next write operation on b.
    func (b *Writer) AvailableBuffer() []byte {
    Go
    - Registered: Tue Apr 30 11:13:12 GMT 2024
    - Last Modified: Thu Oct 12 14:39:08 GMT 2023
    - 21.8K bytes
    - Viewed (0)
  2. src/main/java/jcifs/dcerpc/rpc.java

                    _src.dec_ndr_long();
                    int _bufferl = _src.dec_ndr_long();
                    int _bufferi = _src.index;
                    _src.advance(2 * _bufferl);
    
                    if ( this.buffer == null ) {
                        if ( _buffers < 0 || _buffers > 0xFFFF )
                            throw new NdrException(NdrException.INVALID_CONFORMANCE);
    Java
    - Registered: Sun May 05 00:10:10 GMT 2024
    - Last Modified: Fri Mar 22 20:40:13 GMT 2019
    - 8.8K bytes
    - Viewed (0)
  3. okhttp/src/test/java/okhttp3/internal/cache2/RelayTest.kt

      private fun sourceReader(source: Source?): Callable<ByteString> {
        return Callable {
          val buffer = Buffer()
          while (source!!.read(buffer, 16384) != -1L) {
          }
          source.close()
          buffer.readByteString()
        }
      }
    
      private fun assertFile(
        prefix: ByteString,
        upstreamSize: Long,
        metadataSize: Int,
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Thu Apr 11 22:09:35 GMT 2024
    - 8.1K bytes
    - Viewed (0)
  4. android/guava/src/com/google/common/io/ByteStreams.java

        int initialBufferSize = min(BUFFER_SIZE, max(128, Integer.highestOneBit(totalLen) * 2));
        // Starting with an 8k buffer, double the size of each successive buffer. Smaller buffers
        // quadruple in size until they reach 8k, to minimize the number of small reads for longer
        // streams. Buffers are retained in a deque so that there's no copying between buffers while
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Wed Jan 17 18:59:58 GMT 2024
    - 29.7K bytes
    - Viewed (0)
  5. src/main/java/jcifs/smb1/smb1/NetServerEnum2Response.java

                e.name = readString( buffer, bufferIndex, 16, false );
                bufferIndex += 16;
                e.versionMajor = (int)( buffer[bufferIndex++] & 0xFF );
                e.versionMinor = (int)( buffer[bufferIndex++] & 0xFF );
                e.type = readInt4( buffer, bufferIndex );
                bufferIndex += 4;
                int off = readInt4( buffer, bufferIndex );
                bufferIndex += 4;
    Java
    - Registered: Sun May 05 00:10:10 GMT 2024
    - Last Modified: Fri Mar 22 21:10:40 GMT 2019
    - 4.4K bytes
    - Viewed (0)
  6. okhttp/src/test/java/okhttp3/internal/ws/MessageDeflaterInflaterTest.kt

        val buffer = Buffer()
        buffer.write(byteString)
        deflate(buffer)
        return buffer.readByteString()
      }
    
      private fun MessageInflater.inflate(byteString: ByteString): ByteString {
        val buffer = Buffer()
        buffer.write(byteString)
        inflate(buffer)
        return buffer.readByteString()
      }
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Sat Jan 06 05:31:00 GMT 2024
    - 5K bytes
    - Viewed (0)
  7. okhttp-logging-interceptor/src/test/java/okhttp3/logging/IsProbablyUtf8Test.kt

    import okhttp3.logging.internal.isProbablyUtf8
    import okio.Buffer
    import org.junit.jupiter.api.Test
    
    class IsProbablyUtf8Test {
      @Test fun isProbablyUtf8() {
        assertThat(Buffer().isProbablyUtf8()).isTrue()
        assertThat(Buffer().writeUtf8("abc").isProbablyUtf8()).isTrue()
        assertThat(Buffer().writeUtf8("new\r\nlines").isProbablyUtf8()).isTrue()
        assertThat(Buffer().writeUtf8("white\t space").isProbablyUtf8()).isTrue()
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Wed Dec 20 23:27:07 GMT 2023
    - 1.3K bytes
    - Viewed (0)
  8. okhttp-testing-support/src/main/kotlin/okhttp3/UppercaseResponseInterceptor.kt

            val read = delegate.read(buffer, byteCount)
            if (read != -1L) {
              sink.write(buffer.readByteString().toAsciiUppercase())
            }
            return read
          }
        }
      }
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 1.8K bytes
    - Viewed (0)
  9. guava-tests/test/com/google/common/hash/HashingInputStreamTest.java

      private static final byte[] testBytes = new byte[] {'y', 'a', 'm', 's'};
      private ByteArrayInputStream buffer;
    
      @SuppressWarnings("DoNotMock")
      @Override
      protected void setUp() throws Exception {
        super.setUp();
        hasher = mock(Hasher.class);
        hashFunction = mock(HashFunction.class);
        buffer = new ByteArrayInputStream(testBytes);
    
        when(hashFunction.newHasher()).thenReturn(hasher);
      }
    
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Fri Oct 02 16:24:50 GMT 2020
    - 5K bytes
    - Viewed (0)
  10. okhttp/src/test/java/okhttp3/MultipartReaderTest.kt

            boundary = "simple boundary",
            source = Buffer().writeUtf8(multipart),
          )
    
        assertThat(parts.nextPart()).isNotNull()
        assertThat(parts.nextPart()).isNull()
        assertThat(parts.nextPart()).isNull()
      }
    
      @Test fun `empty source`() {
        val parts =
          MultipartReader(
            boundary = "simple boundary",
            source = Buffer(),
          )
    
        assertFailsWith<EOFException> {
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 13.8K bytes
    - Viewed (0)
Back to top