rwwrapper

package
v0.9.9 Latest Latest
Warning

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

Go to latest
Published: Dec 20, 2024 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 ReaderWrapper

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

func NewReaderWrapper

func NewReaderWrapper(r io.ReadCloser) *ReaderWrapper

func (*ReaderWrapper) Close

func (irw *ReaderWrapper) Close() error

func (*ReaderWrapper) Read

func (irw *ReaderWrapper) Read(p []byte) (int, error)

type ReaderWrapperr

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

func NewReaderWrapperr

func NewReaderWrapperr() *ReaderWrapperr

func (*ReaderWrapperr) Close

func (rw *ReaderWrapperr) Close() error

func (*ReaderWrapperr) Read

func (rw *ReaderWrapperr) Read(p []byte) (int, error)

func (*ReaderWrapperr) Set

func (*ReaderWrapperr) SetR

func (rw *ReaderWrapperr) SetR(r io.Reader) *ReaderWrapperr

func (*ReaderWrapperr) SetRR

type WriterWrapper

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

func NewWriterWrapper

func NewWriterWrapper(w io.WriteCloser) *WriterWrapper

func (*WriterWrapper) Close

func (i *WriterWrapper) Close() error

func (*WriterWrapper) Flush

func (i *WriterWrapper) Flush() error

func (*WriterWrapper) Nwrite

func (i *WriterWrapper) Nwrite() uint64

func (*WriterWrapper) Write

func (i *WriterWrapper) Write(p []byte) (int, error)

type WriterWrapperr

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

比如调用gzip.Writer.Close并不会调用gzip.Writer.w的Close方法,这里手动包一层writer 例如使用gzip写到file,下面几个writer的关系是

WriterWrapperr {
        w: gzip.Writer {
                w: *WriterWrapper {
                        w: *os.File
                }
        }
        ww: *WriterWrapper {
                w: *os.File
        }
}

func NewWriterWrapperr

func NewWriterWrapperr() *WriterWrapperr

func (*WriterWrapperr) Close

func (w *WriterWrapperr) Close() error

func (*WriterWrapperr) Flush

func (w *WriterWrapperr) Flush() error

func (*WriterWrapperr) Nwrite

func (w *WriterWrapperr) Nwrite() uint64

func (*WriterWrapperr) Set

func (*WriterWrapperr) SetW

func (*WriterWrapperr) SetWW

func (*WriterWrapperr) Write

func (w *WriterWrapperr) Write(p []byte) (n int, err error)

Jump to

Keyboard shortcuts

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