bytes2

package
v2.0.0-alpha2+incompat... Latest Latest
Warning

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

Go to latest
Published: Aug 28, 2015 License: BSD-3-Clause Imports: 4 Imported by: 0

Documentation

Overview

Package bytes2 provides alternate implementations of functionality similar to go's bytes package.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ChunkedWriter

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

ChunkedWriter has the same interface as bytes.Buffer's write functions. It additionally provides a Reserve function that returns a []byte that the caller can directly change.

func NewChunkedWriter

func NewChunkedWriter(chunkSize int) *ChunkedWriter

func (*ChunkedWriter) Bytes

func (cw *ChunkedWriter) Bytes() (b []byte)

Bytes This function can get expensive for large buffers.

func (*ChunkedWriter) Len

func (cw *ChunkedWriter) Len() int

func (*ChunkedWriter) Reserve

func (cw *ChunkedWriter) Reserve(n int) (b []byte)

func (*ChunkedWriter) Reset

func (cw *ChunkedWriter) Reset()

func (*ChunkedWriter) Truncate

func (cw *ChunkedWriter) Truncate(n int)

func (*ChunkedWriter) Write

func (cw *ChunkedWriter) Write(p []byte) (n int, err error)

func (*ChunkedWriter) WriteByte

func (cw *ChunkedWriter) WriteByte(c byte) error

func (*ChunkedWriter) WriteRune

func (cw *ChunkedWriter) WriteRune(r rune) (n int, err error)

func (*ChunkedWriter) WriteString

func (cw *ChunkedWriter) WriteString(p string) (n int, err error)

func (*ChunkedWriter) WriteTo

func (cw *ChunkedWriter) WriteTo(w io.Writer) (n int64, err error)

Jump to

Keyboard shortcuts

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