@Override protected void writeEncodedValue(final Symbol val) { final int length = val.length(); final EncoderImpl encoder = getEncoder(); for (int i = 0; i < length; i++) { encoder.writeRaw((byte) val.charAt(i)); } }
public TypeEncoding<DescribedType> getEncoding(final DescribedType val) { TypeEncoding underlyingEncoding = _encoder.getType(val.getDescribed()).getEncoding(val.getDescribed()); TypeEncoding encoding = _encodings.get(underlyingEncoding); if (encoding == null) { encoding = new DynamicDescribedTypeEncoding(underlyingEncoding); _encodings.put(underlyingEncoding, encoding); } return encoding; }
Decimal64Type(final EncoderImpl encoder, final DecoderImpl decoder) { _decimal64Encoder = new Decimal64Encoding(encoder, decoder); encoder.register(Decimal64.class, this); decoder.register(this); }
SymbolType(final EncoderImpl encoder, final DecoderImpl decoder) { _symbolEncoding = new LongSymbolEncoding(encoder, decoder); _shortSymbolEncoding = new ShortSymbolEncoding(encoder, decoder); encoder.register(Symbol.class, this); decoder.register(this); }