kubernetes/vendor/github.com/json-iterator/go/stream.go

type Stream

// NewStream create new stream instance.
// cfg can be jsoniter.ConfigDefault.
// out can be nil if write to internal buffer.
// bufSize is the initial size for the internal buffer in bytes.
func NewStream(cfg API, out io.Writer, bufSize int) *Stream {}

// Pool returns a pool can provide more stream with same configuration
func (stream *Stream) Pool() StreamPool {}

// Reset reuse this stream instance by assign a new writer
func (stream *Stream) Reset(out io.Writer) {}

// Available returns how many bytes are unused in the buffer.
func (stream *Stream) Available() int {}

// Buffered returns the number of bytes that have been written into the current buffer.
func (stream *Stream) Buffered() int {}

// Buffer if writer is nil, use this method to take the result
func (stream *Stream) Buffer() []byte {}

// SetBuffer allows to append to the internal buffer directly
func (stream *Stream) SetBuffer(buf []byte) {}

// Write writes the contents of p into the buffer.
// It returns the number of bytes written.
// If nn < len(p), it also returns an error explaining
// why the write is short.
func (stream *Stream) Write(p []byte) (nn int, err error) {}

// WriteByte writes a single byte.
func (stream *Stream) writeByte(c byte) {}

func (stream *Stream) writeTwoBytes(c1 byte, c2 byte) {}

func (stream *Stream) writeThreeBytes(c1 byte, c2 byte, c3 byte) {}

func (stream *Stream) writeFourBytes(c1 byte, c2 byte, c3 byte, c4 byte) {}

func (stream *Stream) writeFiveBytes(c1 byte, c2 byte, c3 byte, c4 byte, c5 byte) {}

// Flush writes any buffered data to the underlying io.Writer.
func (stream *Stream) Flush() error {}

// WriteRaw write string out without quotes, just like []byte
func (stream *Stream) WriteRaw(s string) {}

// WriteNil write null to stream
func (stream *Stream) WriteNil() {}

// WriteTrue write true to stream
func (stream *Stream) WriteTrue() {}

// WriteFalse write false to stream
func (stream *Stream) WriteFalse() {}

// WriteBool write true or false into stream
func (stream *Stream) WriteBool(val bool) {}

// WriteObjectStart write { with possible indention
func (stream *Stream) WriteObjectStart() {}

// WriteObjectField write "field": with possible indention
func (stream *Stream) WriteObjectField(field string) {}

// WriteObjectEnd write } with possible indention
func (stream *Stream) WriteObjectEnd() {}

// WriteEmptyObject write {}
func (stream *Stream) WriteEmptyObject() {}

// WriteMore write , with possible indention
func (stream *Stream) WriteMore() {}

// WriteArrayStart write [ with possible indention
func (stream *Stream) WriteArrayStart() {}

// WriteEmptyArray write []
func (stream *Stream) WriteEmptyArray() {}

// WriteArrayEnd write ] with possible indention
func (stream *Stream) WriteArrayEnd() {}

func (stream *Stream) writeIndention(delta int) {}