Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 12 for eof (0.43 sec)

  1. guava-tests/test/com/google/common/io/SourceSinkTester.java

              .put("\\n line break", "hello\nworld")
              .put("\\r line break", "hello\rworld")
              .put("\\r\\n line break", "hello\r\nworld")
              .put("\\n at EOF", "hello\nworld\n")
              .put("\\r at EOF", "hello\nworld\r")
              .put("lorem ipsum", LOREM_IPSUM)
              .buildOrThrow();
    
      protected final F factory;
      protected final T data;
      protected final T expected;
    
    Java
    - Registered: Fri Apr 12 12:43:09 GMT 2024
    - Last Modified: Wed Apr 27 18:57:08 GMT 2022
    - 4.9K bytes
    - Viewed (0)
  2. android/guava-tests/test/com/google/common/io/SourceSinkTester.java

              .put("\\n line break", "hello\nworld")
              .put("\\r line break", "hello\rworld")
              .put("\\r\\n line break", "hello\r\nworld")
              .put("\\n at EOF", "hello\nworld\n")
              .put("\\r at EOF", "hello\nworld\r")
              .put("lorem ipsum", LOREM_IPSUM)
              .buildOrThrow();
    
      protected final F factory;
      protected final T data;
      protected final T expected;
    
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Wed Apr 27 18:57:08 GMT 2022
    - 4.9K bytes
    - Viewed (0)
  3. guava-tests/test/com/google/common/io/LittleEndianDataInputStreamTest.java

        assertEquals(Bytes.asList(data), Bytes.asList(b));
      }
    
      public void testReadUnsignedByte_eof() throws IOException {
        DataInput in = new LittleEndianDataInputStream(new ByteArrayInputStream(new byte[0]));
        assertThrows(EOFException.class, () -> in.readUnsignedByte());
      }
    
      public void testReadUnsignedShort_eof() throws IOException {
        byte[] buf = {23};
    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)
  4. android/guava-tests/test/com/google/common/io/LittleEndianDataInputStreamTest.java

        assertEquals(Bytes.asList(data), Bytes.asList(b));
      }
    
      public void testReadUnsignedByte_eof() throws IOException {
        DataInput in = new LittleEndianDataInputStream(new ByteArrayInputStream(new byte[0]));
        assertThrows(EOFException.class, () -> in.readUnsignedByte());
      }
    
      public void testReadUnsignedShort_eof() throws IOException {
        byte[] buf = {23};
    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)
  5. android/guava/src/com/google/common/io/LittleEndianDataInputStream.java

        return readUnsignedByte() != 0;
      }
    
      /**
       * Reads a byte from the input stream checking that the end of file (EOF) has not been
       * encountered.
       *
       * @return byte read from input
       * @throws IOException if an error is encountered while reading
       * @throws EOFException if the end of file (EOF) is encountered.
       */
      private byte readAndCheckByte() throws IOException, EOFException {
        int b1 = in.read();
    
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Wed May 17 14:35:11 GMT 2023
    - 7.3K bytes
    - Viewed (0)
  6. android/guava/src/com/google/common/io/ByteStreams.java

              // is smaller.
              buf = new byte[skip];
            }
            if ((skipped = in.read(buf, 0, skip)) == -1) {
              // Reached EOF
              break;
            }
          }
    
          totalSkipped += skipped;
        }
    
        return totalSkipped;
      }
    
      /**
    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)
  7. guava-tests/test/com/google/common/io/CharStreamsTest.java

                return seen;
              }
            };
        assertEquals(2, CharStreams.readLines(r, conditional).intValue());
        assertEquals("ab", sb.toString());
      }
    
      public void testSkipFully_EOF() throws IOException {
        Reader reader = new StringReader("abcde");
        assertThrows(EOFException.class, () -> CharStreams.skipFully(reader, 6));
      }
    
      public void testSkipFully() throws IOException {
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Wed Sep 06 17:04:31 GMT 2023
    - 11.2K bytes
    - Viewed (0)
  8. android/guava-tests/test/com/google/common/io/CharStreamsTest.java

                return seen;
              }
            };
        assertEquals(2, CharStreams.readLines(r, conditional).intValue());
        assertEquals("ab", sb.toString());
      }
    
      public void testSkipFully_EOF() throws IOException {
        Reader reader = new StringReader("abcde");
        assertThrows(EOFException.class, () -> CharStreams.skipFully(reader, 6));
      }
    
      public void testSkipFully() throws IOException {
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Wed Sep 06 17:04:31 GMT 2023
    - 11.2K bytes
    - Viewed (0)
  9. guava-tests/benchmark/com/google/common/io/ByteSourceAsCharSourceReadBenchmark.java

                  bufIndex += nRead;
                  remaining -= nRead;
                }
                if (nRead == -1) {
                  // we reached EOF
                  return new String(buffer, 0, bufIndex);
                }
                // otherwise we got the size wrong.  This can happen if the size changes between when
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Mon Oct 10 19:45:10 GMT 2022
    - 5.2K bytes
    - Viewed (0)
  10. android/guava-tests/benchmark/com/google/common/io/ByteSourceAsCharSourceReadBenchmark.java

                  bufIndex += nRead;
                  remaining -= nRead;
                }
                if (nRead == -1) {
                  // we reached EOF
                  return new String(buffer, 0, bufIndex);
                }
                // otherwise we got the size wrong.  This can happen if the size changes between when
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Mon Oct 10 19:45:10 GMT 2022
    - 5.2K bytes
    - Viewed (0)
Back to top