buf

package
v1.0.7 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 30, 2021 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrInsufficientSize = fmt.Errorf("insufficient size")
View Source
var ErrNilObject = fmt.Errorf("nil object")

Functions

This section is empty.

Types

type ByteBuf

type ByteBuf interface {
	io.Writer
	io.Reader
	io.Closer
	ReaderIndex() int
	WriterIndex() int
	MarkReaderIndex() ByteBuf
	ResetReaderIndex() ByteBuf
	MarkWriterIndex() ByteBuf
	ResetWriterIndex() ByteBuf
	Reset() ByteBuf
	Bytes() []byte
	ReadableBytes() int
	Cap() int
	Grow(v int) ByteBuf
	Skip(v int) ByteBuf
	Clone() ByteBuf
	WriteByte(c byte) ByteBuf
	WriteBytes(bs []byte) ByteBuf
	WriteString(s string) ByteBuf
	WriteByteBuf(buf ByteBuf) ByteBuf
	WriteReader(reader io.Reader) ByteBuf
	WriteInt16(v int16) ByteBuf
	WriteUInt16(v uint16) ByteBuf
	WriteInt32(v int32) ByteBuf
	WriteUInt32(v uint32) ByteBuf
	WriteInt64(v int64) ByteBuf
	WriteUInt64(v uint64) ByteBuf
	ReadByte() byte
	ReadBytes(len int) []byte
	ReadByteBuf(len int) ByteBuf
	ReadWriter(writer io.Writer) ByteBuf
	ReadInt16() int16
	ReadUInt16() uint16
	ReadInt32() int32
	ReadUInt32() uint32
	ReadInt64() int64
	ReadUInt64() uint64
}

func EmptyByteBuf

func EmptyByteBuf() ByteBuf

func NewByteBuf

func NewByteBuf(bs []byte) ByteBuf

func NewByteBufString

func NewByteBufString(str string) ByteBuf

type DefaultByteBuf

type DefaultByteBuf struct {
	// contains filtered or unexported fields
}

func (*DefaultByteBuf) Bytes

func (b *DefaultByteBuf) Bytes() []byte

func (*DefaultByteBuf) Cap

func (b *DefaultByteBuf) Cap() int

func (*DefaultByteBuf) Clone

func (b *DefaultByteBuf) Clone() ByteBuf

func (*DefaultByteBuf) Close

func (b *DefaultByteBuf) Close() error

func (*DefaultByteBuf) Grow

func (b *DefaultByteBuf) Grow(v int) ByteBuf

func (*DefaultByteBuf) MarkReaderIndex

func (b *DefaultByteBuf) MarkReaderIndex() ByteBuf

func (*DefaultByteBuf) MarkWriterIndex

func (b *DefaultByteBuf) MarkWriterIndex() ByteBuf

func (*DefaultByteBuf) Read

func (b *DefaultByteBuf) Read(p []byte) (n int, err error)

func (*DefaultByteBuf) ReadByte

func (b *DefaultByteBuf) ReadByte() byte

func (*DefaultByteBuf) ReadByteBuf

func (b *DefaultByteBuf) ReadByteBuf(len int) ByteBuf

func (*DefaultByteBuf) ReadBytes

func (b *DefaultByteBuf) ReadBytes(len int) []byte

func (*DefaultByteBuf) ReadInt16

func (b *DefaultByteBuf) ReadInt16() int16

func (*DefaultByteBuf) ReadInt32

func (b *DefaultByteBuf) ReadInt32() int32

func (*DefaultByteBuf) ReadInt64

func (b *DefaultByteBuf) ReadInt64() int64

func (*DefaultByteBuf) ReadUInt16

func (b *DefaultByteBuf) ReadUInt16() uint16

func (*DefaultByteBuf) ReadUInt32

func (b *DefaultByteBuf) ReadUInt32() uint32

func (*DefaultByteBuf) ReadUInt64

func (b *DefaultByteBuf) ReadUInt64() uint64

func (*DefaultByteBuf) ReadWriter

func (b *DefaultByteBuf) ReadWriter(writer io.Writer) ByteBuf

func (*DefaultByteBuf) ReadableBytes

func (b *DefaultByteBuf) ReadableBytes() int

func (*DefaultByteBuf) ReaderIndex

func (b *DefaultByteBuf) ReaderIndex() int

func (*DefaultByteBuf) Reset

func (b *DefaultByteBuf) Reset() ByteBuf

func (*DefaultByteBuf) ResetReaderIndex

func (b *DefaultByteBuf) ResetReaderIndex() ByteBuf

func (*DefaultByteBuf) ResetWriterIndex

func (b *DefaultByteBuf) ResetWriterIndex() ByteBuf

func (*DefaultByteBuf) Skip

func (b *DefaultByteBuf) Skip(v int) ByteBuf

func (*DefaultByteBuf) Write

func (b *DefaultByteBuf) Write(p []byte) (n int, err error)

func (*DefaultByteBuf) WriteByte

func (b *DefaultByteBuf) WriteByte(c byte) ByteBuf

func (*DefaultByteBuf) WriteByteBuf

func (b *DefaultByteBuf) WriteByteBuf(buf ByteBuf) ByteBuf

func (*DefaultByteBuf) WriteBytes

func (b *DefaultByteBuf) WriteBytes(bs []byte) ByteBuf

func (*DefaultByteBuf) WriteInt16

func (b *DefaultByteBuf) WriteInt16(v int16) ByteBuf

func (*DefaultByteBuf) WriteInt32

func (b *DefaultByteBuf) WriteInt32(v int32) ByteBuf

func (*DefaultByteBuf) WriteInt64

func (b *DefaultByteBuf) WriteInt64(v int64) ByteBuf

func (*DefaultByteBuf) WriteReader

func (b *DefaultByteBuf) WriteReader(reader io.Reader) ByteBuf

func (*DefaultByteBuf) WriteString

func (b *DefaultByteBuf) WriteString(s string) ByteBuf

func (*DefaultByteBuf) WriteUInt16

func (b *DefaultByteBuf) WriteUInt16(v uint16) ByteBuf

func (*DefaultByteBuf) WriteUInt32

func (b *DefaultByteBuf) WriteUInt32(v uint32) ByteBuf

func (*DefaultByteBuf) WriteUInt64

func (b *DefaultByteBuf) WriteUInt64(v uint64) ByteBuf

func (*DefaultByteBuf) WriterIndex

func (b *DefaultByteBuf) WriterIndex() int

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL