Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 14 for skipFully (0.16 sec)

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

        assertThrows(EOFException.class, () -> CharStreams.skipFully(reader, 6));
      }
    
      public void testSkipFully() throws IOException {
        String testString = "abcdef";
        Reader reader = new StringReader(testString);
    
        assertEquals(testString.charAt(0), reader.read());
        CharStreams.skipFully(reader, 1);
        assertEquals(testString.charAt(2), reader.read());
        CharStreams.skipFully(reader, 2);
    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)
  2. android/guava-tests/test/com/google/common/io/CharStreamsTest.java

        assertThrows(EOFException.class, () -> CharStreams.skipFully(reader, 6));
      }
    
      public void testSkipFully() throws IOException {
        String testString = "abcdef";
        Reader reader = new StringReader(testString);
    
        assertEquals(testString.charAt(0), reader.read());
        CharStreams.skipFully(reader, 1);
        assertEquals(testString.charAt(2), reader.read());
        CharStreams.skipFully(reader, 2);
    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)
  3. android/guava/src/com/google/common/io/CharStreams.java

       * @param n the number of characters to skip
       * @throws EOFException if this stream reaches the end before skipping all the characters
       * @throws IOException if an I/O error occurs
       */
      public static void skipFully(Reader reader, long n) throws IOException {
        checkNotNull(reader);
        while (n > 0) {
          long amt = reader.skip(n);
          if (amt == 0) {
            throw new EOFException();
          }
          n -= amt;
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Wed May 17 14:35:11 GMT 2023
    - 10.9K bytes
    - Viewed (0)
  4. android/guava-tests/test/com/google/common/io/ByteStreamsTest.java

        assertThrows(EOFException.class, () -> skipHelper(101, 0, new ByteArrayInputStream(bytes)));
      }
    
      private static void skipHelper(long n, int expect, InputStream in) throws IOException {
        ByteStreams.skipFully(in, n);
        assertEquals(expect, in.read());
        in.close();
      }
    
      private static final byte[] bytes = new byte[] {0x12, 0x34, 0x56, 0x78, 0x76, 0x54, 0x32, 0x10};
    
      public void testNewDataInput_empty() {
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Wed Sep 06 17:04:31 GMT 2023
    - 21.9K bytes
    - Viewed (0)
  5. guava-tests/test/com/google/common/io/ByteStreamsTest.java

        assertThrows(EOFException.class, () -> skipHelper(101, 0, new ByteArrayInputStream(bytes)));
      }
    
      private static void skipHelper(long n, int expect, InputStream in) throws IOException {
        ByteStreams.skipFully(in, n);
        assertEquals(expect, in.read());
        in.close();
      }
    
      private static final byte[] bytes = new byte[] {0x12, 0x34, 0x56, 0x78, 0x76, 0x54, 0x32, 0x10};
    
      public void testNewDataInput_empty() {
    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)
  6. android/guava/src/com/google/common/io/ByteStreams.java

       * @throws EOFException if this stream reaches the end before skipping all the bytes
       * @throws IOException if an I/O error occurs, or the stream does not support skipping
       */
      public static void skipFully(InputStream in, long n) throws IOException {
        long skipped = skipUpTo(in, n);
        if (skipped < n) {
          throw new EOFException(
    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. android/guava-tests/test/com/google/common/base/JoinerTest.java

      }
    
      public void testSkipNulls() {
        Joiner skipNulls = J.skipNulls();
        checkNoOutput(skipNulls, ITERABLE_);
        checkNoOutput(skipNulls, ITERABLE_NULL);
        checkNoOutput(skipNulls, ITERABLE_NULL_NULL);
        checkNoOutput(skipNulls, ITERABLE_FOUR_NULLS);
        checkResult(skipNulls, ITERABLE_1, "1");
        checkResult(skipNulls, ITERABLE_12, "1-2");
        checkResult(skipNulls, ITERABLE_123, "1-2-3");
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Fri Feb 09 15:49:48 GMT 2024
    - 12.6K bytes
    - Viewed (0)
  8. guava-tests/test/com/google/common/base/JoinerTest.java

      }
    
      public void testSkipNulls() {
        Joiner skipNulls = J.skipNulls();
        checkNoOutput(skipNulls, ITERABLE_);
        checkNoOutput(skipNulls, ITERABLE_NULL);
        checkNoOutput(skipNulls, ITERABLE_NULL_NULL);
        checkNoOutput(skipNulls, ITERABLE_FOUR_NULLS);
        checkResult(skipNulls, ITERABLE_1, "1");
        checkResult(skipNulls, ITERABLE_12, "1-2");
        checkResult(skipNulls, ITERABLE_123, "1-2-3");
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Fri Feb 09 15:49:48 GMT 2024
    - 12.6K bytes
    - Viewed (0)
  9. android/guava/src/com/google/common/base/Joiner.java

     *
     * <pre>{@code
     * Joiner joiner = Joiner.on("; ").skipNulls();
     *  . . .
     * return joiner.join("Harry", null, "Ron", "Hermione");
     * }</pre>
     *
     * <p>This returns the string {@code "Harry; Ron; Hermione"}. Note that all input elements are
     * converted to strings using {@link Object#toString()} before being appended.
     *
     * <p>If neither {@link #skipNulls()} nor {@link #useForNull(String)} is specified, the joining
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Fri Dec 15 19:31:54 GMT 2023
    - 18.6K bytes
    - Viewed (0)
  10. guava/src/com/google/common/base/Joiner.java

     *
     * <pre>{@code
     * Joiner joiner = Joiner.on("; ").skipNulls();
     *  . . .
     * return joiner.join("Harry", null, "Ron", "Hermione");
     * }</pre>
     *
     * <p>This returns the string {@code "Harry; Ron; Hermione"}. Note that all input elements are
     * converted to strings using {@link Object#toString()} before being appended.
     *
     * <p>If neither {@link #skipNulls()} nor {@link #useForNull(String)} is specified, the joining
    Java
    - Registered: Fri Apr 05 12:43:09 GMT 2024
    - Last Modified: Fri Dec 15 19:31:54 GMT 2023
    - 18.6K bytes
    - Viewed (0)
Back to top