Documentation ¶
Overview ¶
Package bufio implements buffered I/O for database read and writes on basis of the standard Go bufio package.
Index ¶
- type Reader
- func (r *Reader) ReadBool() (bool, error)
- func (r *Reader) ReadCesu8(size int) ([]byte, error)
- func (r *Reader) ReadFloat32() (float32, error)
- func (r *Reader) ReadFloat64() (float64, error)
- func (r *Reader) ReadFull(p []byte) error
- func (r *Reader) ReadInt16() (int16, error)
- func (r *Reader) ReadInt32() (int32, error)
- func (r *Reader) ReadInt64() (int64, error)
- func (r *Reader) ReadInt8() (int8, error)
- func (r *Reader) ReadUint16() (uint16, error)
- func (r *Reader) ReadUint32() (uint32, error)
- func (r *Reader) ReadUint64() (uint64, error)
- func (r *Reader) Skip(cnt int) error
- type Writer
- func (w *Writer) WriteBool(v bool) error
- func (w *Writer) WriteCesu8(p []byte) (int, error)
- func (w *Writer) WriteFloat32(f float32) error
- func (w *Writer) WriteFloat64(f float64) error
- func (w *Writer) WriteInt16(i int16) error
- func (w *Writer) WriteInt32(i int32) error
- func (w *Writer) WriteInt64(i int64) error
- func (w *Writer) WriteInt8(i int8) error
- func (w *Writer) WriteStringCesu8(s string) (int, error)
- func (w *Writer) WriteUint16(i uint16) error
- func (w *Writer) WriteUint32(i uint32) error
- func (w *Writer) WriteUint64(i uint64) error
- func (w *Writer) WriteZeroes(cnt int) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Reader ¶
Reader is a bufio.Reader extended by methods needed for hdb protocol.
func NewReaderSize ¶
NewReaderSize creates a new Reader instance with given size for bufio.Reader.
func (*Reader) ReadCesu8 ¶
ReadCesu8 reads a size CESU-8 encoded byte sequence and returns an UTF-8 byte slice.
func (*Reader) ReadFloat32 ¶
ReadFloat32 reads and returns a float32.
func (*Reader) ReadFloat64 ¶
ReadFloat64 reads and returns a float64.
func (*Reader) ReadUint16 ¶
ReadUint16 reads and returns an uint16.
func (*Reader) ReadUint32 ¶
ReadUint32 reads and returns an uint32.
func (*Reader) ReadUint64 ¶
ReadUint64 reads and returns an uint64.
type Writer ¶
Writer is a bufio.Writer extended by methods needed for hdb protocol.
func NewWriterSize ¶
NewWriterSize creates a new Writer instance with given size for bufio.Writer.
func (*Writer) WriteCesu8 ¶
WriteCesu8 writes an UTF-8 byte slice as CESU-8 and returns the CESU-8 bytes written.
func (*Writer) WriteFloat32 ¶
WriteFloat32 writes a float32.
func (*Writer) WriteFloat64 ¶
WriteFloat64 writes a float64.
func (*Writer) WriteStringCesu8 ¶
WriteStringCesu8 is like WriteCesu8 with an UTF-8 string as parameter.
func (*Writer) WriteUint16 ¶
WriteUint16 writes an uint16.
func (*Writer) WriteUint32 ¶
WriteUint32 writes an uint32.
func (*Writer) WriteUint64 ¶
WriteUint64 writes an uint64.
func (*Writer) WriteZeroes ¶
WriteZeroes writes cnt zero byte values.