Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ErrSeekUnsupported = errors.New("bufio: the underlying reader doesn't support seek")
ErrSeekUnsupported error.
Functions ¶
func IsReaderBuffer ¶
IsReaderBuffer returns if this Reader instance is returned by NewReaderBuffer
func NewReaderBuffer ¶
NewReaderBuffer returns a new Reader who uses a extern buffer.
func Seek ¶ added in v1.8.2
Seek sets the offset for the next Read or Write to offset, interpreted according to whence: SeekStart means relative to the start of the file, SeekCurrent means relative to the current offset, and SeekEnd means relative to the end. Seek returns the new offset relative to the start of the file and an error, if any.
Types ¶
type Reader ¶ added in v1.8.2
Reader class.
func NewReader ¶ added in v1.8.2
func NewReader(rd io.ReadSeeker) *Reader
NewReader returns a new Reader whose buffer has the default size.
func NewReaderSize ¶ added in v1.8.2
func NewReaderSize(rd io.ReadSeeker, size int) *Reader
NewReaderSize returns a new Reader whose buffer has at least the specified size. If the argument io.Reader is already a Reader with large enough size, it returns the underlying Reader.
func (*Reader) Seek ¶ added in v1.8.2
Seek sets the offset for the next Read or Write to offset, interpreted according to whence: SeekStart means relative to the start of the file, SeekCurrent means relative to the current offset, and SeekEnd means relative to the end. Seek returns the new offset relative to the start of the file and an error, if any.