Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 105 for ReadLine (0.21 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.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
    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/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);
            }
        }
    
        /**
    Java
    - Registered: Fri May 03 20:58:11 GMT 2024
    - Last Modified: Thu Mar 07 01:59:08 GMT 2024
    - 4.5K bytes
    - Viewed (0)
  5. 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)
  6. 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)
  7. 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)
  8. 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)
  9. src/main/java/jcifs/smb1/netbios/Lmhosts.java

            }
            return result;
        }
    
        static void populate( Reader r ) throws IOException {
            String line;
            BufferedReader br = new BufferedReader( r );
    
            while(( line = br.readLine() ) != null ) {
                line = line.toUpperCase().trim();
                if( line.length() == 0 ) {
                    continue;
                } else if( line.charAt( 0 ) == '#' ) {
    Java
    - Registered: Sun May 05 00:10:10 GMT 2024
    - Last Modified: Fri Mar 22 21:10:40 GMT 2019
    - 5.8K bytes
    - Viewed (0)
  10. 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)
Back to top