Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 128 for read_all (0.3 sec)

  1. okhttp/src/main/kotlin/okhttp3/internal/connection/RealCall.kt

          this.callsPerHost = other.callsPerHost
        }
    
        val host: String
          get() = originalRequest.url.host
    
        val request: Request
          get() = originalRequest
    
        val call: RealCall
          get() = this@RealCall
    
        /**
         * Attempt to enqueue this async call on [executorService]. This will attempt to clean up
         * if the executor has been shut down by reporting the call as failed.
         */
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Sat Apr 20 17:03:43 GMT 2024
    - 17.9K bytes
    - Viewed (2)
  2. cmd/dummy-data-generator_test.go

    }
    
    func TestDummyDataGenerator(t *testing.T) {
    	readAll := func(r io.Reader) string {
    		b, _ := io.ReadAll(r)
    		return string(b)
    	}
    	checkEq := func(a, b string) {
    		if a != b {
    			t.Fatalf("Unexpected equality failure")
    		}
    	}
    
    	checkEq(readAll(NewDummyDataGen(0, 0)), "")
    
    	checkEq(readAll(NewDummyDataGen(10, 0)), readAll(NewDummyDataGen(10, int64(len(alphabets)))))
    
    Go
    - Registered: Sun Apr 21 19:28:08 GMT 2024
    - Last Modified: Mon Sep 19 18:05:16 GMT 2022
    - 4.8K bytes
    - Viewed (0)
  3. internal/ioutil/read_file.go

    	f, err := OsOpenFile(name, readMode, 0o666)
    	if err != nil {
    		return nil, err
    	}
    	defer f.Close()
    	st, err := f.Stat()
    	if err != nil {
    		return io.ReadAll(f)
    	}
    	dst := make([]byte, st.Size())
    	_, err = io.ReadFull(f, dst)
    	return dst, err
    Go
    - Registered: Sun Apr 21 19:28:08 GMT 2024
    - Last Modified: Sat Dec 09 18:17:51 GMT 2023
    - 2.3K bytes
    - Viewed (0)
  4. internal/config/crypto.go

    // ciphertext.
    func EncryptBytes(k kms.KMS, plaintext []byte, context kms.Context) ([]byte, error) {
    	ciphertext, err := Encrypt(k, bytes.NewReader(plaintext), context)
    	if err != nil {
    		return nil, err
    	}
    	return io.ReadAll(ciphertext)
    }
    
    // DecryptBytes decrypts the ciphertext using a key managed by the KMS.
    // The same context that have been used during encryption must be
    // provided.
    Go
    - Registered: Sun Apr 21 19:28:08 GMT 2024
    - Last Modified: Mon Mar 06 16:56:10 GMT 2023
    - 4.8K bytes
    - Viewed (0)
  5. src/archive/tar/reader.go

    		n += nn
    	}
    	if len(b) == n && err == io.EOF {
    		err = nil
    	}
    	return n, err
    }
    
    // readSpecialFile is like io.ReadAll except it returns
    // ErrFieldTooLong if more than maxSpecialFileSize is read.
    func readSpecialFile(r io.Reader) ([]byte, error) {
    	buf, err := io.ReadAll(io.LimitReader(r, maxSpecialFileSize+1))
    	if len(buf) > maxSpecialFileSize {
    		return nil, ErrFieldTooLong
    	}
    	return buf, err
    }
    
    Go
    - Registered: Tue Apr 23 11:13:09 GMT 2024
    - Last Modified: Fri Mar 08 01:59:14 GMT 2024
    - 26.8K bytes
    - Viewed (0)
  6. okhttp/src/main/kotlin/okhttp3/Dispatcher.kt

    import java.util.concurrent.TimeUnit
    import java.util.concurrent.locks.ReentrantLock
    import okhttp3.internal.assertNotHeld
    import okhttp3.internal.connection.Locks.withLock
    import okhttp3.internal.connection.RealCall
    import okhttp3.internal.connection.RealCall.AsyncCall
    import okhttp3.internal.okHttpName
    import okhttp3.internal.threadFactory
    
    /**
     * Policy on when async requests are executed.
     *
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Sat Apr 20 17:03:43 GMT 2024
    - 9K bytes
    - Viewed (0)
  7. cmd/storage-rest-server.go

    			if err == io.EOF {
    				return nil
    			}
    			return err
    		case 1:
    			errorText, err := io.ReadAll(respBody)
    			if err != nil {
    				return err
    			}
    			return errors.New(string(errorText))
    		case 2:
    			// Block of data
    			var tmp [4]byte
    			_, err := io.ReadFull(respBody, tmp[:])
    			if err != nil {
    				return err
    			}
    			length := binary.LittleEndian.Uint32(tmp[:])
    Go
    - Registered: Sun Apr 21 19:28:08 GMT 2024
    - Last Modified: Thu Apr 11 17:45:28 GMT 2024
    - 44.3K bytes
    - Viewed (0)
  8. istioctl/pkg/writer/envoy/configdump/secret_test.go

    	}
    	defer configDumpFile.Close()
    	configDump, err := io.ReadAll(configDumpFile)
    	if err != nil {
    		t.Errorf("error reading test data file: %v", err)
    	}
    
    	outFile, err := os.Open("testdata/secret/output")
    	if err != nil {
    		t.Errorf("error opening test data output file: %v", err)
    	}
    	defer outFile.Close()
    	expectedOut, err := io.ReadAll(outFile)
    	if err != nil {
    Go
    - Registered: Wed Apr 24 22:53:08 GMT 2024
    - Last Modified: Tue Jun 06 15:14:48 GMT 2023
    - 1.5K bytes
    - Viewed (0)
  9. okhttp/src/test/java/okhttp3/RecordingExecutor.kt

    import java.util.concurrent.TimeUnit
    import okhttp3.internal.connection.RealCall
    import okhttp3.internal.finishedAccessor
    
    internal class RecordingExecutor(
      private val dispatcherTest: DispatcherTest,
    ) : AbstractExecutorService() {
      private var shutdown: Boolean = false
      private val calls = mutableListOf<RealCall.AsyncCall>()
    
      override fun execute(command: Runnable) {
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 2.1K bytes
    - Viewed (0)
  10. internal/config/crypto_test.go

    			t.Fatalf("Test %d: failed to encrypt stream: %v", i, err)
    		}
    		data, err := io.ReadAll(ciphertext)
    		if err != nil {
    			t.Fatalf("Test %d: failed to encrypt stream: %v", i, err)
    		}
    
    		plaintext, err := Decrypt(KMS, bytes.NewReader(data), test.Context)
    		if err != nil {
    			t.Fatalf("Test %d: failed to decrypt stream: %v", i, err)
    		}
    		data, err = io.ReadAll(plaintext)
    		if err != nil {
    Go
    - Registered: Sun Apr 21 19:28:08 GMT 2024
    - Last Modified: Mon Sep 19 18:05:16 GMT 2022
    - 3.2K bytes
    - Viewed (0)
Back to top