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) Cnt() int
- func (r *Reader) GetError() error
- func (r *Reader) ReadB() byte
- func (r *Reader) ReadBool() bool
- func (r *Reader) ReadCesu8(size int) []byte
- func (r *Reader) ReadFloat32() float32
- func (r *Reader) ReadFloat64() float64
- func (r *Reader) ReadFull(p []byte)
- func (r *Reader) ReadInt16() int16
- func (r *Reader) ReadInt32() int32
- func (r *Reader) ReadInt64() int64
- func (r *Reader) ReadInt8() int8
- func (r *Reader) ReadUint16() uint16
- func (r *Reader) ReadUint32() uint32
- func (r *Reader) ReadUint64() uint64
- func (r *Reader) ResetCnt()
- func (r *Reader) Skip(cnt int)
- type Writer
- func (w *Writer) Flush() error
- func (w *Writer) Write(p []byte)
- func (w *Writer) WriteB(b byte)
- func (w *Writer) WriteBool(v bool)
- func (w *Writer) WriteCesu8(p []byte) int
- func (w *Writer) WriteFloat32(f float32)
- func (w *Writer) WriteFloat64(f float64)
- func (w *Writer) WriteInt16(i int16)
- func (w *Writer) WriteInt32(i int32)
- func (w *Writer) WriteInt64(i int64)
- func (w *Writer) WriteInt8(i int8)
- func (w *Writer) WriteString(s string)
- func (w *Writer) WriteStringCesu8(s string) int
- func (w *Writer) WriteUint16(i uint16)
- func (w *Writer) WriteUint32(i uint32)
- func (w *Writer) WriteUint64(i uint64)
- func (w *Writer) WriteZeroes(cnt int)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Reader ¶
type Reader struct {
// contains filtered or unexported fields
}
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 ¶
type Writer struct {
// contains filtered or unexported fields
}
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) WriteString ¶ added in v0.10.0
WriteString writes a string.
func (*Writer) WriteStringCesu8 ¶
WriteStringCesu8 is like WriteCesu8 with an UTF-8 string as parameter.
func (*Writer) WriteZeroes ¶
WriteZeroes writes cnt zero byte values.