()
| 53 | } |
| 54 | |
| 55 | func (r *binaryReader) ReadInt16() (int16, error) { |
| 56 | b, err := r.read(2) |
| 57 | if len(b) < 2 { |
| 58 | return 0, err |
| 59 | } |
| 60 | return int16(binary.BigEndian.Uint16(b)), nil |
| 61 | } |
| 62 | |
| 63 | func (r *binaryReader) ReadInt32() (int32, error) { |
| 64 | b, err := r.read(4) |