MCPcopy Create free account
hub / github.com/ZeppelinMC/Zeppelin / readInt

Method readInt

protocol/nbt/staticReader.go:39–44  ·  view source on GitHub ↗

reads an int, big endian

()

Source from the content-addressed store, hash-verified

37
38// reads an int, big endian
39func (r StaticReader) readInt() (int32, error) {
40 var data [4]byte
41 _, err := r.r.Read(data[:])
42
43 return int32(data[0])<<24 | int32(data[1])<<16 | int32(data[2])<<8 | int32(data[3]), err
44}
45
46// reads a long, big endian
47func (r StaticReader) readLong() (int64, error) {

Callers 3

IntMethod · 0.95
ReadAllMethod · 0.45
ReadMethod · 0.45

Calls 1

ReadMethod · 0.45

Tested by

no test coverage detected