func (sc scanCloser) Buffer(buf []byte, max int) {
	sc.scanner.Buffer(buf, max)
}
Buffer will run the Buffer function on the underlying bufio.Scanner.
package utfutil
import (
	"bufio"
	"bytes"
	"io"
	"io/ioutil"
	"os"
	"golang.org/x/text/encoding"
	"golang.org/x/text/encoding/unicode"
	"golang.org/x/text/transform"
)
type EncodingHint int
const (
	UTF8 EncodingHint = iota
	UTF16LE
	UTF16BE
	WINDOWS = UTF16LE
	POSIX = UTF8
	HTML5 = UTF8
)
type UTFReadCloser interface {
	Read(p []byte) (n int, err error)
	Close() error
}
type readCloser struct {
	file   *os.File
	reader io.Reader
}
func (u readCloser) Read(p []byte) (n int, err error) {
	return u.reader.Read(p)
}
func (u readCloser) Close() error {
	if u.file != nil {
		return u.file.Close()
	}
	return nil
}
type UTFScanCloser interface {
	Buffer(buf []byte, max int)
	Bytes() []byte
	Err() error
	Scan() bool
	Split(split bufio.SplitFunc)
	Text() string
	Close() error
}
type scanCloser struct {
	file    UTFReadCloser
	scanner *bufio.Scanner
}