nivio

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Dec 23, 2019 License: MIT Imports: 3 Imported by: 0

Documentation

Index

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 , The :D

func NewReader

func NewReader(sourceReader io.Reader) *Reader

NewReader Creates a new NivIO reader backed by the sourceReader

func (*Reader) ReadBytes

func (stream *Reader) ReadBytes(numBytes uint64) ([]byte, error)

ReadBytes Reads at maximum the given number of bytes from the stream and returns them

func (*Reader) ReadString

func (stream *Reader) ReadString() (string, error)

ReadString Reads a string from the stream

func (*Reader) ReadStruct

func (stream *Reader) ReadStruct(data interface{}) error

ReadStruct reads the struct!

func (*Reader) ReadUInt32

func (stream *Reader) ReadUInt32() (uint32, error)

ReadUInt32 Reads the int from the stream

func (*Reader) ReadUInt64

func (stream *Reader) ReadUInt64() (uint64, error)

ReadUInt64 Reads the int from the stream

func (*Reader) ReadUInt8

func (stream *Reader) ReadUInt8() (uint8, error)

ReadUInt8 Reads the int from the stream

type Writer

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

Writer The Writer :D

func NewWriter

func NewWriter(sourceWriter io.Writer) *Writer

NewWriter Creates a new NivIO writer backed by the sourceWriter

func (*Writer) Flush

func (stream *Writer) Flush() error

Flush Flushes the stream

func (*Writer) Write

func (stream *Writer) Write(p []byte) (n int, err error)

func (*Writer) WriteBytes

func (stream *Writer) WriteBytes(bytes []byte) error

WriteBytes Writes the given slice of bytes into the stream

func (*Writer) WriteString

func (stream *Writer) WriteString(str string) error

WriteString Writes the string into the stream

func (*Writer) WriteStruct

func (stream *Writer) WriteStruct(data interface{}) error

WriteStruct writes the struct!

func (*Writer) WriteUInt32

func (stream *Writer) WriteUInt32(num uint32) error

WriteUInt32 Writes an unsigned thirtytwo bit integer into the stream

func (*Writer) WriteUInt64

func (stream *Writer) WriteUInt64(num uint64) error

WriteUInt64 Writes an unsigned sixtyfour bit integer into the stream

func (*Writer) WriteUInt8

func (stream *Writer) WriteUInt8(num uint8) error

WriteUInt8 Writes an unsigned eight bit integer into the stream

Jump to

Keyboard shortcuts

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