Search Options

Results per page
Sort
Preferred Languages
Advance

Results 21 - 30 of 2,207 for Read (0.18 sec)

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

      public boolean closed() {
        return closed;
      }
    
      @Override
      public int read() throws IOException {
        throwIf(closed);
        throwIf(READ_THROWS);
        return in.read();
      }
    
      @Override
      public int read(byte[] b, int off, int len) throws IOException {
        throwIf(closed);
        throwIf(READ_THROWS);
        return in.read(b, off, len);
      }
    
      @Override
      public long skip(long n) throws IOException {
    Java
    - Registered: Fri Apr 12 12:43:09 GMT 2024
    - Last Modified: Mon Dec 04 17:37:03 GMT 2017
    - 2.5K bytes
    - Viewed (0)
  2. android/guava-tests/test/com/google/common/io/TestInputStream.java

      public boolean closed() {
        return closed;
      }
    
      @Override
      public int read() throws IOException {
        throwIf(closed);
        throwIf(READ_THROWS);
        return in.read();
      }
    
      @Override
      public int read(byte[] b, int off, int len) throws IOException {
        throwIf(closed);
        throwIf(READ_THROWS);
        return in.read(b, off, len);
      }
    
      @Override
      public long skip(long n) throws IOException {
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Mon Dec 04 17:37:03 GMT 2017
    - 2.5K bytes
    - Viewed (0)
  3. android/guava/src/com/google/common/io/LineReader.java

          // 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();
      }
    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)
  4. guava-tests/test/com/google/common/io/FileBackedOutputStreamTest.java

        ByteSource source = out.asByteSource();
    
        out.write(data);
        assertTrue(Arrays.equals(data, source.read()));
    
        out.reset();
        assertTrue(Arrays.equals(new byte[0], source.read()));
    
        out.write(data);
        assertTrue(Arrays.equals(data, source.read()));
    
        out.close();
      }
    
      private static boolean isAndroid() {
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Wed Sep 06 17:04:31 GMT 2023
    - 5.5K bytes
    - Viewed (0)
  5. internal/deadlineconn/deadlineconn.go

    	"time"
    )
    
    // DeadlineConn - is a generic stream-oriented network connection supporting buffered reader and read/write timeout.
    type DeadlineConn struct {
    	net.Conn
    	readDeadline  time.Duration // sets the read deadline on a connection.
    	writeDeadline time.Duration // sets the write deadline on a connection.
    }
    
    // Sets read deadline
    func (c *DeadlineConn) setReadDeadline() {
    	if c.readDeadline > 0 {
    Go
    - Registered: Sun Apr 21 19:28:08 GMT 2024
    - Last Modified: Sat Nov 05 18:09:21 GMT 2022
    - 2.3K bytes
    - Viewed (0)
  6. android/guava-tests/test/com/google/common/io/MultiReaderTest.java

        assertEquals(expected.charAt(0), joinedReader.read());
        CharStreams.skipFully(joinedReader, 1);
        assertEquals(expected.charAt(2), joinedReader.read());
        CharStreams.skipFully(joinedReader, 4);
        assertEquals(expected.charAt(7), joinedReader.read());
        CharStreams.skipFully(joinedReader, 1);
        assertEquals(expected.charAt(9), joinedReader.read());
        assertEquals(-1, joinedReader.read());
      }
    
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Mon Dec 04 17:37:03 GMT 2017
    - 3.7K bytes
    - Viewed (0)
  7. android/guava-tests/test/com/google/common/io/ByteSourceTest.java

        // The stream reports no bytes... importantly, it doesn't read the byte at index 5 when it
        // should be reading the byte at index 10.
        // We could use a custom InputStream instead to make the read start at index 10, but since this
        // is a racy situation anyway, this behavior seems reasonable.
        assertEquals(-1, in.read());
      }
    
      private static class AppendableByteSource extends ByteSource {
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Wed Sep 06 17:04:31 GMT 2023
    - 16.9K bytes
    - Viewed (0)
  8. tensorflow/c/experimental/filesystem/plugins/gcs/gcs_filesystem_test.cc

      std::string result;
      result.resize(6);
      int64_t read = tf_random_access_file::Read(file, 0, 6, &result[0], status_);
      ASSERT_EQ(read, 6) << "Read: " << read << "\n";
      ASSERT_TF_OK(status_);
      ASSERT_EQ(result, "012345") << "Result: " << result << "\n";
    
      read = tf_random_access_file::Read(file, 6, 6, &result[0], status_);
      ASSERT_EQ(read, 4) << "Read: " << read << "\n";
    C++
    - Registered: Tue Apr 23 12:39:09 GMT 2024
    - Last Modified: Mon Aug 31 12:04:23 GMT 2020
    - 24.9K bytes
    - Viewed (0)
  9. internal/s3select/progress.go

    	closed   bool
    }
    
    func (pr *progressReader) Read(p []byte) (n int, err error) {
    	// This ensures that Close will block until Read has completed.
    	// This allows another goroutine to close the reader.
    	pr.closedMu.Lock()
    	defer pr.closedMu.Unlock()
    	if pr.closed {
    		return 0, errors.New("progressReader: read after Close")
    	}
    	return pr.processedReader.Read(p)
    }
    
    func (pr *progressReader) Close() error {
    Go
    - Registered: Sun Apr 21 19:28:08 GMT 2024
    - Last Modified: Mon Oct 18 15:44:36 GMT 2021
    - 4.2K bytes
    - Viewed (0)
  10. mockwebserver/src/test/java/mockwebserver3/MockWebServerTest.kt

        assertThat(inputStream!!.read()).isEqualTo('A'.code)
        assertThat(inputStream.read()).isEqualTo('B'.code)
        assertThat(inputStream.read()).isEqualTo('C'.code)
        assertThat(inputStream.read()).isEqualTo('D'.code)
        assertThat(inputStream.read()).isEqualTo('E'.code)
        assertThat(inputStream.read()).isEqualTo('F'.code)
        assertThat(inputStream.read()).isEqualTo(-1)
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 23.5K bytes
    - Viewed (0)
Back to top