MCPcopy Create free account
hub / github.com/apache/fory / ReadInt16Slice

Method ReadInt16Slice

go/fory/reader.go:322–337  ·  view source on GitHub ↗

ReadInt16Slice reads []int16 with optional ref/type info

(refMode RefMode, readType bool)

Source from the content-addressed store, hash-verified

320
321// ReadInt16Slice reads []int16 with optional ref/type info
322func (c *ReadContext) ReadInt16Slice(refMode RefMode, readType bool) []int16 {
323 err := c.Err()
324 if refMode != RefModeNone {
325 if c.buffer.ReadInt8(err) == NullFlag {
326 return nil
327 }
328 }
329 if readType {
330 actual := TypeId(c.buffer.ReadUint8(err))
331 if actual != INT16_ARRAY {
332 c.SetError(TypeMismatchError(actual, INT16_ARRAY))
333 return nil
334 }
335 }
336 return ReadInt16Slice(c.buffer, err)
337}
338
339// ReadInt32Slice reads []int32 with optional ref/type info
340func (c *ReadContext) ReadInt32Slice(refMode RefMode, readType bool) []int32 {

Callers 2

readRemainingFieldMethod · 0.80
DeserializeFunction · 0.80

Calls 7

ErrMethod · 0.95
SetErrorMethod · 0.95
TypeMismatchErrorFunction · 0.85
ReadInt16SliceFunction · 0.85
ReadUint8Method · 0.80
TypeIdEnum · 0.50
ReadInt8Method · 0.45

Tested by

no test coverage detected