Search Options

Results per page
Sort
Preferred Languages
Advance

Results 21 - 30 of 2,212 for Read (0.15 sec)

  1. src/bufio/bufio_test.go

    	buf := make([]byte, 1)
    	if _, err := b.Read(nil); err != nil {
    		t.Fatalf("1st nil Read = %v; want nil", err)
    	}
    	if _, err := b.Read(buf); err != errFake {
    		t.Fatalf("1st Read = %v; want errFake", err)
    	}
    	if _, err := b.Read(nil); err != nil {
    		t.Fatalf("2nd nil Read = %v; want nil", err)
    	}
    	if _, err := b.Read(buf); err != nil {
    		t.Fatalf("3rd Read with buffer = %v; want nil", err)
    	}
    Go
    - Registered: Tue Apr 16 11:13:10 GMT 2024
    - Last Modified: Fri Feb 10 18:56:01 GMT 2023
    - 51.5K bytes
    - Viewed (0)
  2. internal/bucket/bandwidth/reader.go

    type MonitorReaderOptions struct {
    	BucketOptions
    	HeaderSize int
    }
    
    // Read implements a throttled read
    func (r *MonitoredReader) Read(buf []byte) (n int, err error) {
    	if r.throttle == nil {
    		return r.r.Read(buf)
    	}
    	if r.lastErr != nil {
    		err = r.lastErr
    		return
    	}
    	b := r.throttle.Burst()  // maximum available tokens
    Go
    - Registered: Sun Apr 14 19:28:10 GMT 2024
    - Last Modified: Wed Sep 06 03:21:59 GMT 2023
    - 3.1K bytes
    - Viewed (0)
  3. okhttp/src/main/kotlin/okhttp3/internal/cache2/FileOperator.kt

    import java.nio.channels.FileChannel
    import okio.Buffer
    
    /**
     * Read and write a target file. Unlike Okio's built-in `Okio.source(java.io.File file)` and `Okio.sink(java.io.File file)`
     * this class offers:
     *
     *  * **Read/write:** read and write using the same operator.
     *  * **Random access:** access any position within the file.
     *  * **Shared channels:** read and write a file channel that's shared between
    Plain Text
    - Registered: Fri Apr 12 11:42:09 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 2.4K bytes
    - Viewed (0)
  4. android/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 12 12:43:09 GMT 2024
    - Last Modified: Wed Sep 06 17:04:31 GMT 2023
    - 5.5K bytes
    - Viewed (0)
  5. 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 16 12:39:09 GMT 2024
    - Last Modified: Tue Mar 07 22:08:43 GMT 2023
    - 12.8K bytes
    - Viewed (0)
  6. 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 12 12:43:09 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/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 12 12:43:09 GMT 2024
    - Last Modified: Wed Sep 06 17:04:31 GMT 2023
    - 21.9K bytes
    - Viewed (0)
  8. internal/s3select/csv/reader.go

    	dst   chan [][]string // result of block decode
    	err   error           // any error encountered will be set here
    }
    
    // Read - reads single record.
    // Once Read is called the previous record should no longer be referenced.
    func (r *Reader) Read(dst sql.Record) (sql.Record, error) {
    	// If we have have any records left, return these before any error.
    	for len(r.current) <= r.recordsRead {
    		if r.err != nil {
    Go
    - Registered: Sun Apr 07 19:28:10 GMT 2024
    - Last Modified: Thu Feb 22 06:26:06 GMT 2024
    - 8.9K bytes
    - Viewed (0)
  9. src/main/java/jcifs/smb1/netbios/SocketInputStream.java

        }
    
        public synchronized int read() throws IOException {
            if( read( tmp, 0, 1 ) < 0 ) {
                return -1;
            }
            return tmp[0] & 0xFF;
        }
        public synchronized int read( byte[] b ) throws IOException {
            return read( b, 0, b.length );
        }
    
        /* This method will not return until len bytes have been read
         * or the stream has been closed.
         */
    
    Java
    - Registered: Sun Apr 14 00:10:09 GMT 2024
    - Last Modified: Fri Mar 22 20:39:42 GMT 2019
    - 3.3K bytes
    - Viewed (0)
  10. src/bytes/reader_test.go

    		t.Errorf("r.Len(): got %d, want %d", got, want)
    	}
    	if n, err := r.Read(make([]byte, 10)); err != nil || n != 10 {
    		t.Errorf("Read failed: read %d %v", n, err)
    	}
    	if got, want := r.Len(), 1; got != want {
    		t.Errorf("r.Len(): got %d, want %d", got, want)
    	}
    	if n, err := r.Read(make([]byte, 1)); err != nil || n != 1 {
    		t.Errorf("Read failed: read %d %v; want 1, nil", n, err)
    	}
    	if got, want := r.Len(), 0; got != want {
    Go
    - Registered: Tue Apr 16 11:13:10 GMT 2024
    - Last Modified: Mon Dec 13 18:45:54 GMT 2021
    - 8K bytes
    - Viewed (0)
Back to top