1
0
mirror of https://github.com/json-iterator/go.git synced 2025-06-24 23:16:47 +02:00

fix read int

This commit is contained in:
Tao Wen
2017-02-07 09:24:36 +08:00
parent 6880076b44
commit 2922666717
4 changed files with 26 additions and 2 deletions

View File

@ -17,6 +17,10 @@ func NewStream(out io.Writer, bufSize int) *Stream {
return &Stream{out, make([]byte, bufSize), 0, nil, 0, 0}
}
func (b *Stream) Reset(out io.Writer) {
b.out = out
b.n = 0
}
// Available returns how many bytes are unused in the buffer.
func (b *Stream) Available() int {