io

package
v1.8.3 Latest Latest
Warning

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

Go to latest
Published: May 26, 2023 License: Apache-2.0, MIT, Apache-2.0, + 1 more Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ToByteReader

func ToByteReader(r io.Reader) io.ByteReader

func ToReadSeeker

func ToReadSeeker(ra io.ReaderAt) io.ReadSeeker

func ToReaderAt

func ToReaderAt(rs io.ReadSeeker) io.ReaderAt

Types

type ByteReadSeeker

type ByteReadSeeker interface {
	io.ReadSeeker
	io.ByteReader
}

func ToByteReadSeeker

func ToByteReadSeeker(r io.Reader) ByteReadSeeker

type OffsetWriteSeeker

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

func NewOffsetWriter

func NewOffsetWriter(w io.WriterAt, off int64) *OffsetWriteSeeker

func (*OffsetWriteSeeker) Position

func (ow *OffsetWriteSeeker) Position() int64

Position returns the current position of this writer relative to the initial offset, i.e. the number of bytes written.

func (*OffsetWriteSeeker) Seek

func (ow *OffsetWriteSeeker) Seek(offset int64, whence int) (int64, error)

func (*OffsetWriteSeeker) Write

func (ow *OffsetWriteSeeker) Write(b []byte) (n int, err error)

type ReadSeekerAt

type ReadSeekerAt interface {
	io.Reader
	io.ReaderAt
	io.Seeker
	io.ByteReader
}

func NewOffsetReadSeeker

func NewOffsetReadSeeker(r io.ReaderAt, off int64) (ReadSeekerAt, error)

NewOffsetReadSeeker returns an ReadSeekerAt that reads from r starting offset offset off and stops with io.EOF when r reaches its end. The Seek function will panic if whence io.SeekEnd is passed.

Jump to

Keyboard shortcuts

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