- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 54 for readSlice (0.1 sec)
-
src/bufio/bufio.go
// part of the line returned by ReadLine. func (b *Reader) ReadLine() (line []byte, isPrefix bool, err error) { line, err = b.ReadSlice('\n') if err == ErrBufferFull { // Handle the case where "\r\n" straddles the buffer. if len(line) > 0 && line[len(line)-1] == '\r' { // Put the '\r' back on buf and drop it from line. // Let the next call to ReadLine check for "\r\n". if b.r == 0 {
Registered: Tue Nov 05 11:13:11 UTC 2024 - Last Modified: Thu Oct 12 14:39:08 UTC 2023 - 21.8K bytes - Viewed (0) -
src/bytes/buffer.go
func (b *Buffer) ReadBytes(delim byte) (line []byte, err error) { slice, err := b.readSlice(delim) // return a copy of slice. The buffer's backing array may // be overwritten by later calls. line = append(line, slice...) return line, err } // readSlice is like ReadBytes but returns a reference to internal buffer data. func (b *Buffer) readSlice(delim byte) (line []byte, err error) { i := IndexByte(b.buf[b.off:], delim)
Registered: Tue Nov 05 11:13:11 UTC 2024 - Last Modified: Tue Oct 29 16:47:05 UTC 2024 - 15.7K bytes - Viewed (0) -
src/bufio/bufio_test.go
(*Reader).ReadBytes, (*Reader).ReadSlice, func(r *Reader, delim byte) ([]byte, error) { data, err := r.ReadString(delim) return []byte(data), err }, // ReadLine doesn't fit the data/pattern easily // so we leave it out. It should be covered via // the ReadSlice test since ReadLine simply calls // ReadSlice, and it's that function that handles // the last byte. }
Registered: Tue Nov 05 11:13:11 UTC 2024 - Last Modified: Fri Nov 01 21:52:12 UTC 2024 - 51.6K bytes - Viewed (0) -
cmd/streaming-signature-v4.go
// The returned bytes are owned by the bufio.Reader // so they are only valid until the next bufio read. func readChunkLine(b *bufio.Reader) ([]byte, []byte, error) { buf, err := b.ReadSlice('\n') if err != nil { // We always know when EOF is coming. // If the caller asked for a line, there should be a line. if err == io.EOF { err = io.ErrUnexpectedEOF } else if err == bufio.ErrBufferFull {
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Thu May 16 23:13:47 UTC 2024 - 18.2K bytes - Viewed (0) -
okhttp/src/main/kotlin/okhttp3/internal/http1/HeadersReader.kt
/** Read a single line counted against the header size limit. */ fun readLine(): String { val line = source.readUtf8LineStrict(headerLimit) headerLimit -= line.length.toLong() return line } /** Reads headers or trailers. */ fun readHeaders(): Headers { val result = Headers.Builder() while (true) { val line = readLine() if (line.isEmpty()) break result.addLenient(line) }
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Wed Dec 20 23:27:07 UTC 2023 - 1.4K bytes - Viewed (0) -
guava/src/com/google/common/io/CharSource.java
return reader.readLine(); } catch (Throwable e) { throw closer.rethrow(e); } finally { closer.close(); } } /** * Reads all the lines of this source as a list of strings. The returned list will be empty if * this source is empty. * * <p>Like {@link BufferedReader#readLine()}, this method considers a line to be a sequence of
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Thu Oct 31 14:20:11 UTC 2024 - 25.5K bytes - Viewed (0) -
mockwebserver/src/test/java/mockwebserver3/MockWebServerTest.kt
val reader = BufferedReader(InputStreamReader(connection.inputStream, UTF_8)) assertThat(connection.responseCode).isEqualTo(HttpURLConnection.HTTP_OK) assertThat(reader.readLine()).isEqualTo("hello world") val request = server.takeRequest() assertThat(request.requestLine).isEqualTo("GET / HTTP/1.1") assertThat(request.headers["Accept-Language"]).isEqualTo("en-US")
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Jan 08 01:13:22 UTC 2024 - 23.5K bytes - Viewed (0) -
mockwebserver-deprecated/src/test/java/okhttp3/mockwebserver/MockWebServerTest.kt
val reader = BufferedReader(InputStreamReader(inputStream, StandardCharsets.UTF_8)) assertThat(connection.getResponseCode()).isEqualTo(HttpURLConnection.HTTP_OK) assertThat(reader.readLine()).isEqualTo("hello world") val request = server.takeRequest() assertThat(request.requestLine).isEqualTo("GET / HTTP/1.1") assertThat(request.getHeader("Accept-Language")).isEqualTo("en-US")
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Jan 08 01:13:22 UTC 2024 - 21.9K bytes - Viewed (0) -
src/main/java/org/codelibs/core/io/ReaderUtil.java
* @return 一行の文字列。終端に達した場合は{@literal null} * @see BufferedReader#readLine() */ public static String readLine(final BufferedReader reader) { assertArgumentNotNull("reader", reader); try { return reader.readLine(); } catch (final IOException e) { throw new IORuntimeException(e); } } /**
Registered: Fri Nov 01 20:58:10 UTC 2024 - Last Modified: Thu Mar 07 01:59:08 UTC 2024 - 4.5K bytes - Viewed (0) -
android/guava/src/com/google/common/io/LineReader.java
import java.util.ArrayDeque; import java.util.Queue; import javax.annotation.CheckForNull; /** * A class for reading lines of text. Provides the same functionality as {@link * java.io.BufferedReader#readLine()} but for all {@link Readable} objects, not just instances of * {@link Reader}. * * @author Chris Nokleberg * @since 1.0 */ @J2ktIncompatible @GwtIncompatible @ElementTypesAreNonnullByDefault
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Wed May 17 14:35:11 UTC 2023 - 3.1K bytes - Viewed (0)