Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 74 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 May 03 11:42:14 GMT 2024
    - Last Modified: Sat Apr 20 17:03:43 GMT 2024
    - 17.9K bytes
    - Viewed (2)
  2. 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 30 11:13:12 GMT 2024
    - Last Modified: Fri Mar 08 01:59:14 GMT 2024
    - 26.8K bytes
    - Viewed (0)
  3. 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 May 05 19:28:20 GMT 2024
    - Last Modified: Sun Apr 28 17:53:50 GMT 2024
    - 44.8K bytes
    - Viewed (0)
  4. cmd/storage-rest-client.go

    	}
    	defer xhttp.DrainBody(respBody)
    
    	dec := msgpNewReader(respBody)
    	defer readMsgpReaderPoolPut(dec)
    
    	err = rf.DecodeMsg(dec)
    	return rf, err
    }
    
    // ReadAll - reads all contents of a file.
    func (client *storageRESTClient) ReadAll(ctx context.Context, volume string, path string) ([]byte, error) {
    	gridBytes, err := storageReadAllRPC.Call(ctx, client.gridConn, &ReadAllHandlerParams{
    		DiskID:   *client.diskID.Load(),
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Sun Apr 28 17:53:50 GMT 2024
    - 26.1K bytes
    - Viewed (0)
  5. okhttp/src/main/kotlin/okhttp3/internal/NativeImageTestsAccessors.kt

     * limitations under the License.
     */
    package okhttp3.internal
    
    import okhttp3.Cache
    import okhttp3.Dispatcher
    import okhttp3.Response
    import okhttp3.internal.connection.Exchange
    import okhttp3.internal.connection.RealCall
    import okhttp3.internal.connection.RealConnection
    import okio.FileSystem
    import okio.Path
    
    internal fun buildCache(
      file: Path,
      maxSize: Long,
      fileSystem: FileSystem,
    ): Cache {
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Wed Apr 10 19:46:48 GMT 2024
    - 1.3K 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 May 03 11:42:14 GMT 2024
    - Last Modified: Sat Apr 20 17:03:43 GMT 2024
    - 9K bytes
    - Viewed (0)
  7. src/archive/zip/zip_test.go

    	rc.(*checksumReader).hash = fakeHash32{}
    	for i := 0; i < chunks; i++ {
    		_, err := io.ReadFull(rc, chunk)
    		if err != nil {
    			t.Fatal("read:", err)
    		}
    	}
    	if frag := int(size % chunkSize); frag > 0 {
    		_, err := io.ReadFull(rc, chunk[:frag])
    		if err != nil {
    			t.Fatal("read:", err)
    		}
    	}
    	gotEnd, err := io.ReadAll(rc)
    	if err != nil {
    		t.Fatal("read end:", err)
    	}
    	if !bytes.Equal(gotEnd, end) {
    Go
    - Registered: Tue Apr 30 11:13:12 GMT 2024
    - Last Modified: Wed Mar 27 18:23:49 GMT 2024
    - 19.5K bytes
    - Viewed (0)
  8. cmd/metacache-stream.go

    			continue
    		}
    		res = append(res, meta)
    	}
    	return metaCacheEntriesSorted{o: res}, nil
    }
    
    // readAll will return all remaining objects on the dst channel and close it when done.
    // The context allows the operation to be canceled.
    func (r *metacacheReader) readAll(ctx context.Context, dst chan<- metaCacheEntry) error {
    	r.checkInit()
    	if r.err != nil {
    		return r.err
    	}
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Thu Apr 04 12:04:40 GMT 2024
    - 19.5K bytes
    - Viewed (0)
  9. cmd/xl-storage.go

    		buf = buf[:sz]
    	} else {
    		buf = make([]byte, sz)
    	}
    
    	// Read file...
    	_, err = io.ReadFull(f, buf)
    
    	return buf, stat.ModTime().UTC(), osErrToFileErr(err)
    }
    
    // ReadAll is a raw call, reads content at any path and returns the buffer.
    func (s *xlStorage) ReadAll(ctx context.Context, volume string, path string) (buf []byte, err error) {
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Sun Apr 28 17:53:50 GMT 2024
    - 84.7K bytes
    - Viewed (0)
  10. docs/auditlog/auditlog-echo.go

    	"io"
    	"log"
    	"net/http"
    )
    
    var port int
    
    func init() {
    	flag.IntVar(&port, "port", 8080, "Port to listen on")
    }
    
    func mainHandler(w http.ResponseWriter, r *http.Request) {
    	body, err := io.ReadAll(r.Body)
    	defer r.Body.Close()
    	if err != nil {
    		log.Printf("Error reading request body: %v", err)
    		w.WriteHeader(http.StatusBadRequest)
    		return
    	}
    
    	log.Printf(">>> %s %s\n", r.Method, r.URL.Path)
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Wed May 01 21:31:13 GMT 2024
    - 1.5K bytes
    - Viewed (0)
Back to top