Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 692 for Read (0.26 sec)

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

          int off = (int) expectedSize - remaining;
          int read = in.read(bytes, off, remaining);
          if (read == -1) {
            // end of stream before reading expectedSize bytes
            // just return the bytes read so far
            return Arrays.copyOf(bytes, off);
          }
          remaining -= read;
        }
    
        // bytes is now full
        int b = in.read();
        if (b == -1) {
          return bytes;
        }
    
    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)
  2. tensorflow/c/experimental/filesystem/modular_filesystem_registration.cc

                                    TF_WRITABLE_FILE_OPS_ABI, "writable file"));
    
      if (ops->read_only_memory_region_ops != nullptr)
        TF_RETURN_IF_ERROR(CheckABI(ops->read_only_memory_region_ops_abi,
                                    TF_READ_ONLY_MEMORY_REGION_OPS_ABI,
                                    "read only memory region"));
    
      return OkStatus();
    }
    
    C++
    - Registered: Tue Apr 23 12:39:09 GMT 2024
    - Last Modified: Tue Mar 07 22:08:43 GMT 2023
    - 12.8K bytes
    - Viewed (0)
  3. src/main/java/jcifs/smb1/smb1/SmbRandomAccessFile.java

            fp = 0L;
        }
    
        public int read() throws SmbException {
            if( read( tmp, 0, 1 ) == -1 ) {
                return -1;
            }
            return tmp[0] & 0xFF;
        }
        public int read( byte b[] ) throws SmbException {
            return read( b, 0, b.length );
        }
        public int read( byte b[], int off, int len ) throws SmbException {
            if( len <= 0 ) {
    Java
    - Registered: Sun Apr 21 00:10:10 GMT 2024
    - Last Modified: Fri Mar 22 21:10:40 GMT 2019
    - 10.9K bytes
    - Viewed (0)
  4. okhttp/src/main/kotlin/okhttp3/internal/http1/Http1ExchangeCodec.kt

          }
    
          val read = super.read(sink, minOf(byteCount, bytesRemainingInChunk))
          if (read == -1L) {
            carrier.noNewExchanges() // The server didn't supply the promised chunk length.
            val e = ProtocolException("unexpected end of stream")
            responseBodyComplete()
            throw e
          }
          bytesRemainingInChunk -= read
          return read
        }
    
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 16.2K bytes
    - Viewed (0)
  5. tensorflow/c/experimental/filesystem/plugins/gcs/gcs_filesystem.cc

        TF_SetStatus(status, TF_UNKNOWN, "Could not get content-length header");
        return -1;
      }
      // `TF_OUT_OF_RANGE` isn't considered as an error. So we clear it here.
      TF_SetStatus(status, TF_OK, "");
      TF_VLog(1, "Successful read of %s @ %u of size: %u", path.c_str(), offset,
              read);
      stream.read(buffer, read);
      read = stream.gcount();
      if (read < buffer_size) {
    C++
    - Registered: Tue Apr 23 12:39:09 GMT 2024
    - Last Modified: Wed Aug 23 06:55:53 GMT 2023
    - 46.9K bytes
    - Viewed (0)
  6. tensorflow/c/experimental/filesystem/plugins/gcs/ram_file_block_cache.h

          pruning_thread_.reset();
        }
      }
    
      /// Read `n` bytes from `filename` starting at `offset` into `buffer`. It
      /// returns total bytes read ( -1 in case of errors ). This method will set
      /// `status` to:
      ///
      /// 1) The error from the remote filesystem, if the read from the remote
      ///    filesystem failed.
      /// 2) `TF_FAILED_PRECONDITION` if the read from the remote filesystem
      /// succeeded,
    C
    - Registered: Tue Apr 23 12:39:09 GMT 2024
    - Last Modified: Mon Aug 31 04:46:34 GMT 2020
    - 10.6K bytes
    - Viewed (0)
  7. android/guava-tests/test/com/google/common/io/ByteStreamsTest.java

        assertEquals(2, lin.available());
        int read = lin.read();
        assertEquals(big[0], read);
        assertEquals(1, lin.available());
        read = lin.read();
        assertEquals(big[1], read);
        assertEquals(0, lin.available());
        read = lin.read();
        assertEquals(-1, read);
    
        lin.reset();
        byte[] small = new byte[5];
        read = lin.read(small);
        assertEquals(2, read);
        assertEquals(big[0], small[0]);
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Wed Sep 06 17:04:31 GMT 2023
    - 21.9K bytes
    - Viewed (0)
  8. android/guava-tests/test/com/google/common/io/CharSourceTest.java

        assertTrue(source.wasStreamOpened());
        assertFalse(source.wasStreamClosed());
    
        StringWriter writer = new StringWriter();
        char[] buf = new char[64];
        int read;
        while ((read = reader.read(buf)) != -1) {
          writer.write(buf, 0, read);
        }
        reader.close();
        writer.close();
    
        assertTrue(source.wasStreamClosed());
        assertEquals(STRING, writer.toString());
      }
    
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Wed Sep 06 17:04:31 GMT 2023
    - 12K bytes
    - Viewed (0)
  9. 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)
  10. 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)
Back to top