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

Method WriteInt16Slice

go/fory/writer.go:265–277  ·  view source on GitHub ↗

WriteInt16Slice writes []int16 with ref/type info

(value []int16, refMode RefMode, writeTypeInfo bool)

Source from the content-addressed store, hash-verified

263
264// WriteInt16Slice writes []int16 with ref/type info
265func (c *WriteContext) WriteInt16Slice(value []int16, refMode RefMode, writeTypeInfo bool) {
266 if refMode != RefModeNone {
267 if value == nil {
268 c.buffer.WriteInt8(NullFlag)
269 return
270 }
271 c.buffer.WriteInt8(NotNullValueFlag)
272 }
273 if writeTypeInfo {
274 c.WriteTypeId(INT16_ARRAY)
275 }
276 WriteInt16Slice(c.buffer, value)
277}
278
279// WriteInt32Slice writes []int32 with ref/type info
280func (c *WriteContext) WriteInt32Slice(value []int32, refMode RefMode, writeTypeInfo bool) {

Callers 1

writeRemainingFieldMethod · 0.80

Calls 3

WriteTypeIdMethod · 0.95
WriteInt16SliceFunction · 0.85
WriteInt8Method · 0.45

Tested by

no test coverage detected