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

Method readShort

protocol/nbt/staticReader.go:31–36  ·  view source on GitHub ↗

reads a short, big endian

()

Source from the content-addressed store, hash-verified

29
30// reads a short, big endian
31func (r StaticReader) readShort() (int16, error) {
32 var data [2]byte
33 _, err := r.r.Read(data[:])
34
35 return int16(data[0])<<8 | int16(data[1]), err
36}
37
38// reads an int, big endian
39func (r StaticReader) readInt() (int32, error) {

Callers 4

readStringMethod · 0.95
ShortMethod · 0.95
ReadAllMethod · 0.45
ReadMethod · 0.45

Calls 1

ReadMethod · 0.45

Tested by

no test coverage detected