/** Called to read a map instance. May be overridden for alternate map * representations.*/ protected Object readMap(Object old, Schema expected, ResolvingDecoder in) throws IOException { Schema eValue = expected.getValueType(); long l = in.readMapStart(); LogicalType logicalType = eValue.getLogicalType(); Conversion<?> conversion = getData().getConversionFor(logicalType); Object map = newMap(old, (int) l); if (l > 0) { do { if (logicalType != null && conversion != null) { for (int i = 0; i < l; i++) { addToMap(map, readMapKey(null, expected, in), readWithConversion(null, eValue, logicalType, conversion, in)); } } else { for (int i = 0; i < l; i++) { addToMap(map, readMapKey(null, expected, in), readWithoutConversion(null, eValue, in)); } } } while ((l = in.mapNext()) > 0); } return map; }
/** Called to read a map instance. May be overridden for alternate map * representations.*/ protected Object readMap(Object old, Schema expected, ResolvingDecoder in) throws IOException { Schema eValue = expected.getValueType(); long l = in.readMapStart(); LogicalType logicalType = eValue.getLogicalType(); Conversion<?> conversion = getData().getConversionFor(logicalType); Object map = newMap(old, (int) l); if (l > 0) { do { if (logicalType != null && conversion != null) { for (int i = 0; i < l; i++) { addToMap(map, readMapKey(null, expected, in), readWithConversion(null, eValue, logicalType, conversion, in)); } } else { for (int i = 0; i < l; i++) { addToMap(map, readMapKey(null, expected, in), readWithoutConversion(null, eValue, in)); } } } while ((l = in.mapNext()) > 0); } return map; }
/** Called to read a map instance. May be overridden for alternate map * representations.*/ protected Object readMap(Object old, Schema expected, ResolvingDecoder in) throws IOException { Schema eValue = expected.getValueType(); long l = in.readMapStart(); Object map = newMap(old, (int) l); if (l > 0) { do { for (int i = 0; i < l; i++) { addToMap(map, readString(null, in), read(null, eValue, in)); } } while ((l = in.mapNext()) > 0); } return map; }
/** Called to read a map instance. May be overridden for alternate map * representations.*/ protected Object readMap(Object old, Schema expected, ResolvingDecoder in) throws IOException { Schema eValue = expected.getValueType(); long l = in.readMapStart(); Object map = newMap(old, (int) l); if (l > 0) { do { for (int i = 0; i < l; i++) { addToMap(map, readMapKey(null, expected, in), read(null, eValue, in)); } } while ((l = in.mapNext()) > 0); } return map; }
/** Called to read a map instance. May be overridden for alternate map * representations.*/ protected Object readMap(Object old, Schema expected, ResolvingDecoder in) throws IOException { Schema eValue = expected.getValueType(); long l = in.readMapStart(); Object map = newMap(old, (int) l); if (l > 0) { do { for (int i = 0; i < l; i++) { addToMap(map, readString(null, in), read(null, eValue, in)); } } while ((l = in.mapNext()) > 0); } return map; }
/** Called to read a map instance. May be overridden for alternate map * representations.*/ protected Object readMap(Object old, Schema expected, ResolvingDecoder in) throws IOException { Schema eValue = expected.getValueType(); long l = in.readMapStart(); LogicalType logicalType = eValue.getLogicalType(); Conversion<?> conversion = getData().getConversionFor(logicalType); Object map = newMap(old, (int) l); if (l > 0) { do { if (logicalType != null && conversion != null) { for (int i = 0; i < l; i++) { addToMap(map, readMapKey(null, expected, in), readWithConversion(null, eValue, logicalType, conversion, in)); } } else { for (int i = 0; i < l; i++) { addToMap(map, readMapKey(null, expected, in), readWithoutConversion(null, eValue, in)); } } } while ((l = in.mapNext()) > 0); } return map; }