- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 698 for Buffer (0.18 sec)
-
src/bytes/buffer.go
// The slice aliases the buffer content at least until the next buffer modification, // so immediate changes to the slice will affect the result of future reads. func (b *Buffer) Bytes() []byte { return b.buf[b.off:] } // AvailableBuffer returns an empty buffer with b.Available() capacity. // This buffer is intended to be appended to and
Go - Registered: Tue Apr 30 11:13:12 GMT 2024 - Last Modified: Fri Oct 13 17:10:31 GMT 2023 - 15.7K bytes - Viewed (0) -
src/bytes/buffer_test.go
// Confirm that when Reader panics, the empty buffer remains empty var buf2 Buffer defer func() { recover() check(t, "TestReadFromPanicReader (2)", &buf2, "") }() buf2.ReadFrom(panicReader{panic: true}) } func TestReadFromNegativeReader(t *testing.T) { var b Buffer defer func() { switch err := recover().(type) { case nil: t.Fatal("bytes.Buffer.ReadFrom didn't panic") case error:
Go - Registered: Tue Apr 30 11:13:12 GMT 2024 - Last Modified: Fri Apr 26 13:31:36 GMT 2024 - 18.6K bytes - Viewed (0) -
okhttp/src/test/java/okhttp3/internal/cache2/FileOperatorTest.kt
val buffer = Buffer() operator.read(6, buffer, 21) operator.read(36, buffer, 1) operator.read(5, buffer, 5) operator.read(28, buffer, 8) operator.read(17, buffer, 10) operator.read(36, buffer, 2) operator.read(2, buffer, 4) operator.write(0, buffer, buffer.size) operator.read(0, buffer, 12) operator.read(47, buffer, 3) operator.read(45, buffer, 2) operator.read(47, buffer, 3)
Plain Text - Registered: Fri May 03 11:42:14 GMT 2024 - Last Modified: Mon Jan 08 01:13:22 GMT 2024 - 5.8K bytes - Viewed (0) -
android/guava/src/com/google/common/io/ReaderInputStream.java
private static int availableCapacity(Buffer buffer) { return buffer.capacity() - buffer.limit(); } /** * Flips the buffer output buffer so we can start reading bytes from it. If we are starting to * drain because there was overflow, and there aren't actually any characters to drain, then the * overflow must be due to a small output buffer. */ private void startDraining(boolean overflow) {
Java - Registered: Fri Apr 26 12:43:10 GMT 2024 - Last Modified: Tue Feb 28 20:13:02 GMT 2023 - 9.3K bytes - Viewed (0) -
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) -
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) -
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) -
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) -
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) -
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)