Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 3 of 3 for NewWriterSize (0.13 sec)

  1. src/bufio/bufio_test.go

    	const BufSize = 1000
    	b := NewWriterSize(new(bytes.Buffer), BufSize)
    	// Does it recognize itself?
    	b1 := NewWriterSize(b, BufSize)
    	if b1 != b {
    		t.Error("NewWriterSize did not detect underlying Writer")
    	}
    	// Does it wrap if existing buffer is too small?
    	b2 := NewWriterSize(b, 2*BufSize)
    	if b2 == b {
    		t.Error("NewWriterSize did not enlarge buffer")
    	}
    }
    
    Registered: Tue Nov 05 11:13:11 UTC 2024
    - Last Modified: Fri Nov 01 21:52:12 UTC 2024
    - 51.6K bytes
    - Viewed (0)
  2. src/bufio/bufio.go

    type Writer struct {
    	err error
    	buf []byte
    	n   int
    	wr  io.Writer
    }
    
    // NewWriterSize returns a new [Writer] whose buffer has at least the specified
    // size. If the argument io.Writer is already a [Writer] with large enough
    // size, it returns the underlying [Writer].
    func NewWriterSize(w io.Writer, size int) *Writer {
    	// Is it already a Writer?
    	b, ok := w.(*Writer)
    	if ok && len(b.buf) >= size {
    Registered: Tue Nov 05 11:13:11 UTC 2024
    - Last Modified: Thu Oct 12 14:39:08 UTC 2023
    - 21.8K bytes
    - Viewed (0)
  3. api/go1.txt

    pkg bufio, func NewReadWriter(*Reader, *Writer) *ReadWriter
    pkg bufio, func NewReader(io.Reader) *Reader
    pkg bufio, func NewReaderSize(io.Reader, int) *Reader
    pkg bufio, func NewWriter(io.Writer) *Writer
    pkg bufio, func NewWriterSize(io.Writer, int) *Writer
    pkg bufio, method (*Reader) Buffered() int
    pkg bufio, method (*Reader) Peek(int) ([]uint8, error)
    pkg bufio, method (*Reader) Read([]uint8) (int, error)
    Registered: Tue Nov 05 11:13:11 UTC 2024
    - Last Modified: Wed Aug 14 18:58:28 UTC 2013
    - 1.7M bytes
    - Viewed (0)
Back to top