Search Options

Results per page
Sort
Preferred Languages
Advance

Results 151 - 160 of 440 for readFull (0.29 sec)

  1. src/math/rand/v2/chacha8_test.go

    		t.Errorf("transcript incorrect: got %x, want %x", got, chacha8hash)
    	}
    
    	p.Seed(chacha8seed)
    	h.Reset()
    
    	buf = make([]byte, chacha8outlen)
    	if _, err := io.ReadFull(iotest.OneByteReader(p), buf); err != nil {
    		t.Errorf("one byte reads: %v", err)
    	}
    	h.Write(buf)
    	if got := h.Sum(nil); !bytes.Equal(got, chacha8hash) {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 22 22:09:08 UTC 2024
    - 55K bytes
    - Viewed (0)
  2. src/net/http/h2_bundle.go

    	bufp := http2fhBytes.Get().(*[]byte)
    	defer http2fhBytes.Put(bufp)
    	return http2readFrameHeader(*bufp, r)
    }
    
    func http2readFrameHeader(buf []byte, r io.Reader) (http2FrameHeader, error) {
    	_, err := io.ReadFull(r, buf[:http2frameHeaderLen])
    	if err != nil {
    		return http2FrameHeader{}, err
    	}
    	return http2FrameHeader{
    		Length:   (uint32(buf[0])<<16 | uint32(buf[1])<<8 | uint32(buf[2])),
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Jun 04 16:19:04 UTC 2024
    - 364.1K bytes
    - Viewed (0)
  3. pkg/credentialprovider/config.go

    }
    
    // Error implements error
    func (he *HTTPError) Error() string {
    	return fmt.Sprintf("http status code: %d while fetching url %s",
    		he.StatusCode, he.URL)
    }
    
    // ReadURL read contents from given url
    func ReadURL(url string, client *http.Client, header *http.Header) (body []byte, err error) {
    	req, err := http.NewRequest("GET", url, nil)
    	if err != nil {
    		return nil, err
    	}
    	if header != nil {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Apr 19 15:11:57 UTC 2023
    - 9.3K bytes
    - Viewed (0)
  4. src/main/java/jcifs/pac/PacDataInputStream.java

    
        public int available () throws IOException {
            return this.dis.available();
        }
    
    
        public void readFully ( byte[] b ) throws IOException {
            this.dis.readFully(b);
        }
    
    
        public void readFully ( byte[] b, int off, int len ) throws IOException {
            this.dis.readFully(b, off, len);
        }
    
    
        public char readChar () throws IOException {
            align(2);
    Registered: Wed Jun 12 15:45:55 UTC 2024
    - Last Modified: Sat Jul 21 21:19:58 UTC 2018
    - 5.1K bytes
    - Viewed (0)
  5. src/cmd/go/internal/work/exec.go

    }
    
    func isObject(s string) bool {
    	f, err := os.Open(s)
    	if err != nil {
    		return false
    	}
    	defer f.Close()
    	buf := make([]byte, 64)
    	io.ReadFull(f, buf)
    	for _, magic := range objectMagic {
    		if bytes.HasPrefix(buf, magic) {
    			return true
    		}
    	}
    	return false
    }
    
    // cCompilerEnv returns environment variables to set when running the
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Jun 10 14:46:37 UTC 2024
    - 105.6K bytes
    - Viewed (0)
  6. src/testing/iotest/reader.go

    		}
    
    		// Reading forward should return the last part of the file.
    		data, err := io.ReadAll(&smallByteReader{r: r})
    		if err != nil {
    			return fmt.Errorf("ReadAll from offset %d: %v", middle, err)
    		}
    		if !bytes.Equal(data, content[middle:]) {
    			return fmt.Errorf("ReadAll from offset %d = %q\n\twant %q", middle, data, content[middle:])
    		}
    
    		// Seek relative to end of file, but start elsewhere.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Nov 08 17:55:47 UTC 2023
    - 8K bytes
    - Viewed (0)
  7. src/runtime/testdata/testfds/main.go

    	if err != nil {
    		log.Fatalf("os.Open failed: %s", err)
    	}
    	defer f.Close()
    	b, err := io.ReadAll(os.Stdin)
    	if err != nil {
    		log.Fatalf("io.ReadAll(os.Stdin) failed: %s", err)
    	}
    	if len(b) != 0 {
    		log.Fatalf("io.ReadAll(os.Stdin) returned non-nil: %x", b)
    	}
    	fmt.Fprintf(os.Stdout, "stdout\n")
    	fmt.Fprintf(os.Stderr, "stderr\n")
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Jul 25 16:33:33 UTC 2023
    - 642 bytes
    - Viewed (0)
  8. platforms/core-configuration/core-serialization-codecs/src/main/kotlin/org/gradle/internal/serialize/codecs/core/jos/ObjectInputStreamAdapter.kt

        override fun readLine(): String = unsupported("ObjectInputStream.readLine")
    
        override fun readFully(buf: ByteArray) = unsupported("ObjectInputStream.readFully")
    
        override fun readFully(buf: ByteArray, off: Int, len: Int) = unsupported("ObjectInputStream.readFully")
    
        override fun readUnshared(): Any = unsupported("ObjectInputStream.readUnshared")
    
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Fri Jun 07 23:09:56 UTC 2024
    - 4.4K bytes
    - Viewed (0)
  9. src/net/http/httptest/example_test.go

    		io.WriteString(w, "<html><body>Hello World!</body></html>")
    	}
    
    	req := httptest.NewRequest("GET", "http://example.com/foo", nil)
    	w := httptest.NewRecorder()
    	handler(w, req)
    
    	resp := w.Result()
    	body, _ := io.ReadAll(resp.Body)
    
    	fmt.Println(resp.StatusCode)
    	fmt.Println(resp.Header.Get("Content-Type"))
    	fmt.Println(string(body))
    
    	// Output:
    	// 200
    	// text/html; charset=utf-8
    	// <html><body>Hello World!</body></html>
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Oct 20 18:41:18 UTC 2020
    - 2K bytes
    - Viewed (0)
  10. android/guava-tests/test/com/google/common/io/ByteStreamsTest.java

            NullPointerException.class, () -> ByteStreams.readFully(newTestStream(10), null, 0, 10));
    
        assertThrows(NullPointerException.class, () -> ByteStreams.readFully(null, b, 0, 10));
    
        assertThrows(
            IndexOutOfBoundsException.class, () -> ByteStreams.readFully(newTestStream(10), b, -1, 10));
    
        assertThrows(
            IndexOutOfBoundsException.class, () -> ByteStreams.readFully(newTestStream(10), b, 0, -1));
    
        assertThrows(
    Registered: Wed Jun 12 16:38:11 UTC 2024
    - Last Modified: Wed Sep 06 17:04:31 UTC 2023
    - 21.9K bytes
    - Viewed (0)
Back to top