Documentation
¶
Overview ¶
The files in this package are copied from github.com/valyala/bytebufferpool. We keep the original MIT license and note the upstream source here.
Upstream source:
Repo: github.com/valyala/bytebufferpool Files copied: doc.go, bytebuffer.go, pool.go License: MIT
Index ¶
- func Put(b *ByteBuffer)
- type ByteBuffer
- func (b *ByteBuffer) Bytes() []byte
- func (b *ByteBuffer) Len() int
- func (b *ByteBuffer) ReadFrom(r io.Reader) (int64, error)
- func (b *ByteBuffer) Reset()
- func (b *ByteBuffer) Set(p []byte)
- func (b *ByteBuffer) SetString(s string)
- func (b *ByteBuffer) String() string
- func (b *ByteBuffer) Write(p []byte) (int, error)
- func (b *ByteBuffer) WriteByte(c byte) error
- func (b *ByteBuffer) WriteString(s string) (int, error)
- func (b *ByteBuffer) WriteTo(w io.Writer) (int64, error)
- type Pool
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Put ¶
func Put(b *ByteBuffer)
Types ¶
type ByteBuffer ¶
type ByteBuffer struct {
B []byte
}
ByteBuffer provides byte buffer, which can be used for minimizing memory allocations.
func Get ¶
func Get() *ByteBuffer
func (*ByteBuffer) Bytes ¶
func (b *ByteBuffer) Bytes() []byte
func (*ByteBuffer) Len ¶
func (b *ByteBuffer) Len() int
func (*ByteBuffer) Reset ¶
func (b *ByteBuffer) Reset()
func (*ByteBuffer) Set ¶
func (b *ByteBuffer) Set(p []byte)
func (*ByteBuffer) SetString ¶
func (b *ByteBuffer) SetString(s string)
func (*ByteBuffer) String ¶
func (b *ByteBuffer) String() string
func (*ByteBuffer) WriteByte ¶
func (b *ByteBuffer) WriteByte(c byte) error
func (*ByteBuffer) WriteString ¶
func (b *ByteBuffer) WriteString(s string) (int, error)
type Pool ¶
type Pool struct {
// contains filtered or unexported fields
}
func (*Pool) Get ¶
func (p *Pool) Get() *ByteBuffer
func (*Pool) Put ¶
func (p *Pool) Put(b *ByteBuffer)
Click to show internal directories.
Click to hide internal directories.