Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 411 for readline (0.19 sec)

  1. 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")
    
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 23.5K bytes
    - Viewed (0)
  2. android/guava/src/com/google/common/io/LineReader.java

    import java.io.Reader;
    import java.nio.CharBuffer;
    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
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Wed May 17 14:35:11 GMT 2023
    - 3.1K bytes
    - Viewed (0)
  3. guava-tests/test/com/google/common/io/ByteStreamsTest.java

      }
    
      public void testNewDataInput_readLine() {
        ByteArrayDataInput in =
            ByteStreams.newDataInput(
                "This is a line\r\nThis too\rand this\nand also this".getBytes(Charsets.UTF_8));
        assertEquals("This is a line", in.readLine());
        assertEquals("This too", in.readLine());
        assertEquals("and this", in.readLine());
        assertEquals("and also this", in.readLine());
      }
    
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Wed Sep 06 17:04:31 GMT 2023
    - 21.9K bytes
    - Viewed (0)
  4. src/bufio/bufio_test.go

    	}
    	// Test error after ReadSlice.
    	_, _, err = r.ReadRune() // reset state
    	if err != nil {
    		t.Error("unexpected error on ReadRune (4):", err)
    	}
    	_, err = r.ReadSlice(0)
    	if err != io.EOF {
    		t.Error("unexpected error on ReadSlice (4):", err)
    	}
    	if r.UnreadRune() == nil {
    		t.Error("expected error after ReadSlice (4)")
    	}
    }
    
    func TestUnreadRuneAtEOF(t *testing.T) {
    Go
    - Registered: Tue Apr 30 11:13:12 GMT 2024
    - Last Modified: Fri Feb 10 18:56:01 GMT 2023
    - 51.5K bytes
    - Viewed (0)
  5. src/bufio/bufio.go

    // of the line. The returned buffer is only valid until the next call to
    // ReadLine. ReadLine either returns a non-nil line or it returns an error,
    // never both.
    //
    // The text returned from ReadLine does not include the line end ("\r\n" or "\n").
    // No indication or error is given if the input ends without a final line end.
    // Calling [Reader.UnreadByte] after ReadLine will always unread the last byte read
    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)
  6. guava-tests/test/com/google/common/io/LittleEndianDataInputStreamTest.java

        DataInput in = new LittleEndianDataInputStream(new ByteArrayInputStream(data));
        UnsupportedOperationException expected =
            assertThrows(UnsupportedOperationException.class, () -> in.readLine());
        assertThat(expected).hasMessageThat().isEqualTo("readLine is not supported");
      }
    
      public void testReadLittleEndian() throws IOException {
        DataInput in = new LittleEndianDataInputStream(new ByteArrayInputStream(data));
    
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Wed Sep 06 17:04:31 GMT 2023
    - 4.8K bytes
    - Viewed (0)
  7. android/guava-tests/test/com/google/common/io/LittleEndianDataInputStreamTest.java

        DataInput in = new LittleEndianDataInputStream(new ByteArrayInputStream(data));
        UnsupportedOperationException expected =
            assertThrows(UnsupportedOperationException.class, () -> in.readLine());
        assertThat(expected).hasMessageThat().isEqualTo("readLine is not supported");
      }
    
      public void testReadLittleEndian() throws IOException {
        DataInput in = new LittleEndianDataInputStream(new ByteArrayInputStream(data));
    
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Wed Sep 06 17:04:31 GMT 2023
    - 4.8K bytes
    - Viewed (0)
  8. android/guava/src/com/google/common/io/CharSource.java

       *
       * @throws IOException if an I/O error occurs while reading from this source
       */
      public ImmutableList<String> readLines() throws IOException {
        Closer closer = Closer.create();
        try {
          BufferedReader reader = closer.register(openBufferedStream());
          List<String> result = Lists.newArrayList();
          String line;
          while ((line = reader.readLine()) != null) {
            result.add(line);
          }
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Wed May 17 14:35:11 GMT 2023
    - 22.4K bytes
    - Viewed (0)
  9. 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")
    
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 21.9K bytes
    - Viewed (0)
  10. 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)
        }
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Wed Dec 20 23:27:07 GMT 2023
    - 1.4K bytes
    - Viewed (0)
Back to top