//ReadULong read ulong
496293
func (t *TTFParser) ReadULong(fd *bytes.Reader) (uint, error) {
	buff, err := t.Read(fd, 4)
	//fmt.Printf("%#v\n", buff)
	if err != nil {
		return 0, err
	}
	n := binary.BigEndian.Uint32(buff)
	return uint(n), nil
}
1362117
func (io *standardInputOutput) readOSArg() string {
	if io.context != nil {
		return io.context.Args().First()
	}
	if len(os.Args) > 0 {
		return os.Args[0]
	}
	return ""
}
612103
func (r *MockClient) ReadJSON(filename string) string {
	text, _ := ioutil.ReadFile(filepath.Join(r.FixturesDir, filename))
	return string(text)
}
362013
func (w *writer) readLoop() {
	for {
		if _, _, err := w.conn.NextReader(); err != nil {
			w.conn.Close()
			break
		}
	}
}
1077585
func (m *Message) ReadJSON(v interface{}) error {
	return json.Unmarshal(m.Body, v)
}
197950
func (buffer *BufferedReader) ReadAll(reader io.Reader, callback BufferReadCallback) error {
	for {
		data, more, err := buffer.ReadOne(reader)
		if data != nil && callback != nil {
			callback(data)
		}

		if err != nil {
			return err // ### return, error ###
		}

		if !more {
			return nil // ### return, done ###
		}
	}
}
432761
func (lr *LockedRand) Read(p []byte) (n int, err error) {
	lr.lk.Lock()
	n, err = lr.r.Read(p)
	lr.lk.Unlock()
	return
}
1286288
func (r *Reader) ReadLineString() (line string, err error) {
	b, e := r.ReadLine()
	return string(b), e
}
1276631
func (w *wizard) readJSON() string {
	var blob json.RawMessage

	for {
		fmt.Printf("> ")
		if err := json.NewDecoder(w.in).Decode(&blob); err != nil {
			log.Error("Invalid JSON, please try again", "err", err)
			continue
		}
		return string(blob)
	}
}
404519
func (bd *BinaryDecoder) ReadLong() (int64, error) {
	var value uint64
	var b uint8
	var offset int
	bufLen := int64(len(bd.buf))

	for {
		if offset == maxLongBufSize {
			return 0, LongOverflow
		}

		if bd.pos >= bufLen {
			return 0, InvalidLong
		}

		b = bd.buf[bd.pos]
		value |= uint64(b&0x7F) << uint(7*offset)
		bd.pos++
		offset++

		if b&0x80 == 0 {
			break
		}
	}
	return int64((value >> 1) ^ -(value & 1)), nil
}
498637
func ReadJson(r *http.Request, v interface{}) error {
	body, err := ioutil.ReadAll(r.Body)
	r.Body.Close()
	if err != nil {
		return err
	}
	return json.Unmarshal(body, v)
}
1103000
func (ui *CommandlineUI) readString() string {
	for {
		fmt.Printf("> ")
		text, err := ui.in.ReadString('\n')
		if err != nil {
			log.Crit("Failed to read user input", "err", err)
		}
		if text = strings.TrimSpace(text); text != "" {
			return text
		}
	}
}
840874
func (r *AutoVLANOperResource) ReadAll() ([]core.State, error) {
	return r.StateDriver.ReadAllState(vLANResourceOperPathPrefix, r,
		json.Unmarshal)
}
291968
func (s *Scanner) readPayloadLen() (int, error) {
	if _, err := io.ReadFull(s.r, s.len[:]); err != nil {
		if err == io.ErrUnexpectedEOF {
			return 0, ErrInvalidPktLen
		}

		return 0, err
	}

	n, err := hexDecode(s.len)
	if err != nil {
		return 0, err
	}

	switch {
	case n == 0:
		return 0, nil
	case n <= lenSize:
		return 0, ErrInvalidPktLen
	case n > OversizePayloadMax+lenSize:
		return 0, ErrInvalidPktLen
	default:
		return n - lenSize, nil
	}
}
430318
func ReadStringSlice(r Reader, sl *[]string) (err error) {
	var l VInt
	if err := l.ReadFrom(r, -1); err != nil {
		return errorsp.WithStacks(err)
	}
	if cap(*sl) < int(l) {
		*sl = make([]string, l)
	} else {
		*sl = (*sl)[:l]
	}
	for i := range *sl {
		if err := (*String)(&(*sl)[i]).ReadFrom(r, -1); err != nil {
			return errorsp.WithStacks(err)
		}
	}
	return nil
}
724588
func UnmarshalFromReader(r io.Reader, v Unmarshaler) error {
	data, err := ioutil.ReadAll(r)
	if err != nil {
		return err
	}
	l := jlexer.Lexer{Data: data}
	v.UnmarshalEasyJSON(&l)
	return l.Error()
}
754327
func (p *TCompactProtocol) ReadString() (value string, err error) {
	v, e := p.ReadBinary()
	return string(v), NewTProtocolException(e)
}