Search Options

Results per page
Sort
Preferred Languages
Advance

Results 61 - 70 of 74 for read_bytes (0.22 sec)

  1. okhttp/src/test/java/okhttp3/internal/cache/DiskLruCacheTest.kt

        v1Creator.setString(1, "BBbb")
        v1Creator.commit()
    
        cache["k1"]!!.use { snapshot1 ->
          val inV1 = snapshot1.getSource(0).buffer()
          assertThat(inV1.readByte()).isEqualTo('A'.code.toByte())
          assertThat(inV1.readByte()).isEqualTo('A'.code.toByte())
    
          val v1Updater = cache.edit("k1")!!
          v1Updater.setString(0, "CCcc")
          v1Updater.setString(1, "DDdd")
          v1Updater.commit()
    
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Mon Apr 15 14:55:09 UTC 2024
    - 75.8K bytes
    - Viewed (0)
  2. src/main/java/jcifs/smb/SmbRandomAccessFile.java

            if ( ( read(this.tmp, 0, 1) ) < 0 ) {
                throw new SmbEndOfFileException();
            }
            return this.tmp[ 0 ] != (byte) 0x00;
        }
    
    
        @Override
        public final byte readByte () throws SmbException {
            if ( ( read(this.tmp, 0, 1) ) < 0 ) {
                throw new SmbEndOfFileException();
            }
            return this.tmp[ 0 ];
        }
    
    
        @Override
    Registered: Sun Nov 03 00:10:13 UTC 2024
    - Last Modified: Wed Jan 08 12:01:33 UTC 2020
    - 18.5K bytes
    - Viewed (0)
  3. src/bytes/example_test.go

    	fmt.Println(string(rdbuf))
    	// Output:
    	// 1
    	// bcde
    	// a
    }
    
    func ExampleBuffer_ReadByte() {
    	var b bytes.Buffer
    	b.Grow(64)
    	b.Write([]byte("abcde"))
    	c, err := b.ReadByte()
    	if err != nil {
    		panic(err)
    	}
    	fmt.Println(c)
    	fmt.Println(b.String())
    	// Output:
    	// 97
    	// bcde
    }
    
    func ExampleClone() {
    	b := []byte("abc")
    	clone := bytes.Clone(b)
    Registered: Tue Nov 05 11:13:11 UTC 2024
    - Last Modified: Wed Aug 07 17:22:36 UTC 2024
    - 14.9K bytes
    - Viewed (0)
  4. internal/grid/msg_gen.go

    	}
    	{
    		var zb0004 uint8
    		zb0004, err = dc.ReadUint8()
    		if err != nil {
    			err = msgp.WrapError(err, "Flags")
    			return
    		}
    		z.Flags = Flags(zb0004)
    	}
    	z.Payload, err = dc.ReadBytes(z.Payload)
    	if err != nil {
    		err = msgp.WrapError(err, "Payload")
    		return
    	}
    	return
    }
    
    // EncodeMsg implements msgp.Encodable
    func (z *message) EncodeMsg(en *msgp.Writer) (err error) {
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Thu Jul 25 21:07:21 UTC 2024
    - 22.4K bytes
    - Viewed (0)
  5. android/guava/src/com/google/common/io/ByteSource.java

        checkNotNull(processor);
    
        Closer closer = Closer.create();
        try {
          InputStream in = closer.register(openStream());
          return ByteStreams.readBytes(in, processor);
        } catch (Throwable e) {
          throw closer.rethrow(e);
        } finally {
          closer.close();
        }
      }
    
      /**
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Sat Oct 19 00:26:48 UTC 2024
    - 26.2K bytes
    - Viewed (0)
  6. okhttp/src/test/java/okhttp3/URLConnectionTest.kt

        source.timeout().timeout(1000, TimeUnit.MILLISECONDS)
        assertThat(source.readByte()).isEqualTo('A'.code.toByte())
        assertThat(source.readByte()).isEqualTo('B'.code.toByte())
        assertThat(source.readByte()).isEqualTo('C'.code.toByte())
        assertFailsWith<SocketTimeoutException> {
          source.readByte() // If Content-Length was accurate, this would return -1 immediately.
        }
        source.close()
      }
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Sat Jan 20 10:30:28 UTC 2024
    - 131.7K bytes
    - Viewed (0)
  7. android/guava/src/com/google/common/io/Files.java

          imports = "com.google.common.io.Files")
      @CanIgnoreReturnValue // some processors won't return a useful result
      @ParametricNullness
      public
      static <T extends @Nullable Object> T readBytes(File file, ByteProcessor<T> processor)
          throws IOException {
        return asByteSource(file).read(processor);
      }
    
      /**
       * Computes the hash code of the {@code file} using {@code hashFunction}.
       *
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Mon Jul 22 19:03:12 UTC 2024
    - 33.1K bytes
    - Viewed (0)
  8. guava/src/com/google/common/io/Files.java

          imports = "com.google.common.io.Files")
      @CanIgnoreReturnValue // some processors won't return a useful result
      @ParametricNullness
      public
      static <T extends @Nullable Object> T readBytes(File file, ByteProcessor<T> processor)
          throws IOException {
        return asByteSource(file).read(processor);
      }
    
      /**
       * Computes the hash code of the {@code file} using {@code hashFunction}.
       *
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Mon Jul 22 19:03:12 UTC 2024
    - 33.1K bytes
    - Viewed (0)
  9. cmd/storage-rest-server.go

    // has been used.
    // The returned reader contains the payload.
    func waitForHTTPResponse(respBody io.Reader) (io.Reader, error) {
    	reader := bufio.NewReader(respBody)
    	for {
    		b, err := reader.ReadByte()
    		if err != nil {
    			return nil, err
    		}
    		// Check if we have a response ready or a filler byte.
    		switch b {
    		case 0:
    			return reader, nil
    		case 1:
    			errorText, err := io.ReadAll(reader)
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Wed Aug 14 17:11:51 UTC 2024
    - 45.7K bytes
    - Viewed (0)
  10. okhttp/src/test/java/okhttp3/CallTest.kt

        val bodySource = response.body.source()
        assertThat(bodySource.readByte()).isEqualTo('d'.code.toByte())
    
        // The second byte of this request will be delayed by 750ms so we should time out after 250ms.
        val startNanos = System.nanoTime()
        bodySource.use {
          assertFailsWith<IOException> {
            bodySource.readByte()
          }.also { expected ->
            // Timed out as expected.
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Wed Apr 10 19:46:48 UTC 2024
    - 142.5K bytes
    - Viewed (0)
Back to top