Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 447 for cbuf (0.08 sec)

  1. android/guava/src/com/google/common/io/MultiReader.java

          current = it.next().openStream();
        }
      }
    
      @Override
      public int read(char[] cbuf, int off, int len) throws IOException {
        checkNotNull(cbuf);
        if (current == null) {
          return -1;
        }
        int result = current.read(cbuf, off, len);
        if (result == -1) {
          advance();
          return read(cbuf, off, len);
        }
        return result;
      }
    
      @Override
    Registered: Wed Jun 12 16:38:11 UTC 2024
    - Last Modified: Tue Feb 28 20:13:02 UTC 2023
    - 2.4K bytes
    - Viewed (0)
  2. guava/src/com/google/common/io/MultiReader.java

          current = it.next().openStream();
        }
      }
    
      @Override
      public int read(char[] cbuf, int off, int len) throws IOException {
        checkNotNull(cbuf);
        if (current == null) {
          return -1;
        }
        int result = current.read(cbuf, off, len);
        if (result == -1) {
          advance();
          return read(cbuf, off, len);
        }
        return result;
      }
    
      @Override
    Registered: Wed Jun 12 16:38:11 UTC 2024
    - Last Modified: Tue Feb 28 20:13:02 UTC 2023
    - 2.4K bytes
    - Viewed (0)
  3. android/guava/src/com/google/common/io/LineReader.java

          Java8Compatibility.clear(cbuf);
          // The default implementation of Reader#read(CharBuffer) allocates a
          // temporary char[], so we call Reader#read(char[], int, int) instead.
          int read = (reader != null) ? reader.read(buf, 0, buf.length) : readable.read(cbuf);
          if (read == -1) {
            lineBuf.finish();
            break;
          }
          lineBuf.add(buf, 0, read);
        }
        return lines.poll();
      }
    Registered: Wed Jun 12 16:38:11 UTC 2024
    - Last Modified: Wed May 17 14:35:11 UTC 2023
    - 3.1K bytes
    - Viewed (0)
  4. android/guava/src/com/google/common/io/LineBuffer.java

          if (finishLine(cbuf[pos] == '\n')) {
            pos++;
          }
        }
    
        int start = pos;
        for (int end = off + len; pos < end; pos++) {
          switch (cbuf[pos]) {
            case '\r':
              line.append(cbuf, start, pos - start);
              sawReturn = true;
              if (pos + 1 < end) {
                if (finishLine(cbuf[pos + 1] == '\n')) {
                  pos++;
                }
    Registered: Wed Jun 12 16:38:11 UTC 2024
    - Last Modified: Tue Feb 28 20:13:02 UTC 2023
    - 3.9K bytes
    - Viewed (0)
  5. guava/src/com/google/common/io/LineBuffer.java

          if (finishLine(cbuf[pos] == '\n')) {
            pos++;
          }
        }
    
        int start = pos;
        for (int end = off + len; pos < end; pos++) {
          switch (cbuf[pos]) {
            case '\r':
              line.append(cbuf, start, pos - start);
              sawReturn = true;
              if (pos + 1 < end) {
                if (finishLine(cbuf[pos + 1] == '\n')) {
                  pos++;
                }
    Registered: Wed Jun 12 16:38:11 UTC 2024
    - Last Modified: Tue Feb 28 20:13:02 UTC 2023
    - 3.9K bytes
    - Viewed (0)
  6. maven-xml-impl/src/test/java/org/apache/maven/internal/xml/XmlNodeBuilderTest.java

            String doc = "<?xml version='1.0'?><doc><child>foo</child></doc>";
            StringReader r = new StringReader(doc + doc) {
                @Override
                public int read(char[] cbuf, int off, int len) throws IOException {
                    return super.read(cbuf, off, 1);
                }
            };
            XmlNode node1 = XmlNodeBuilder.build(r);
            XmlNode node2 = XmlNodeBuilder.build(r);
            assertEquals(node1, node2);
        }
    
    Registered: Wed Jun 12 09:55:16 UTC 2024
    - Last Modified: Mon Mar 25 10:50:01 UTC 2024
    - 2.1K bytes
    - Viewed (0)
  7. android/guava/src/com/google/common/io/AppendableWriter.java

      }
    
      /*
       * Abstract methods from Writer
       */
    
      @Override
      public void write(char[] cbuf, int off, int len) throws IOException {
        checkNotClosed();
        // It turns out that creating a new String is usually as fast, or faster
        // than wrapping cbuf in a light-weight CharSequence.
        target.append(new String(cbuf, off, len));
      }
    
      /*
    Registered: Wed Jun 12 16:38:11 UTC 2024
    - Last Modified: Tue Feb 28 20:13:02 UTC 2023
    - 3.4K bytes
    - Viewed (0)
  8. guava/src/com/google/common/io/LineReader.java

          Java8Compatibility.clear(cbuf);
          // The default implementation of Reader#read(CharBuffer) allocates a
          // temporary char[], so we call Reader#read(char[], int, int) instead.
          int read = (reader != null) ? reader.read(buf, 0, buf.length) : readable.read(cbuf);
          if (read == -1) {
            lineBuf.finish();
            break;
          }
          lineBuf.add(buf, 0, read);
        }
        return lines.poll();
      }
    Registered: Wed Jun 12 16:38:11 UTC 2024
    - Last Modified: Wed May 17 14:35:11 UTC 2023
    - 3.1K bytes
    - Viewed (0)
  9. android/guava-tests/test/com/google/common/io/TestCharSink.java

          @Override
          public void write(int c) throws IOException {
            super.write(c);
            flush();
          }
    
          @Override
          public void write(char[] cbuf, int off, int len) throws IOException {
            super.write(cbuf, off, len);
            flush();
          }
    
          @Override
          public void write(String str, int off, int len) throws IOException {
            super.write(str, off, len);
            flush();
    Registered: Wed Jun 12 16:38:11 UTC 2024
    - Last Modified: Fri Apr 21 02:27:51 UTC 2017
    - 2K bytes
    - Viewed (0)
  10. android/guava-tests/test/com/google/common/io/LineBufferTest.java

          @Override
          public int read(CharBuffer cbuf) throws IOException {
            return reader.read(cbuf);
          }
        };
      }
    
      private static Reader getChunkedReader(String input, final int chunk) {
        return new FilterReader(new StringReader(input)) {
          @Override
          public int read(char[] cbuf, int off, int len) throws IOException {
            return super.read(cbuf, off, Math.min(chunk, len));
          }
        };
    Registered: Wed Jun 12 16:38:11 UTC 2024
    - Last Modified: Mon Dec 04 17:37:03 UTC 2017
    - 4.7K bytes
    - Viewed (0)
Back to top