_underlyingEncoder = underlyingEncoder = calculateEncoder(val, getEncoder()); _size = calculateSize(val, underlyingEncoder); getEncoder().writeRaw((byte)val.length); underlyingEncoder.writeConstructor(); for(Object o : val)
_underlyingEncoder = underlyingEncoder = calculateEncoder(val, getEncoder()); _size = calculateSize(val, underlyingEncoder); getEncoder().writeRaw((byte)val.length); underlyingEncoder.writeConstructor(); for(Object o : val)
_underlyingEncoder = underlyingEncoder = calculateEncoder(val, getEncoder()); _size = calculateSize(val, underlyingEncoder); getEncoder().writeRaw((byte)val.length); underlyingEncoder.writeConstructor(); for(Object o : val)
_underlyingEncoder = underlyingEncoder = calculateEncoder(val, getEncoder()); _size = calculateSize(val, underlyingEncoder); getEncoder().writeRaw((byte)val.length); underlyingEncoder.writeConstructor(); for(Object o : val)
public ArrayType(EncoderImpl encoder, final DecoderImpl decoder, BooleanType boolType, ByteType byteType, ShortType shortType, IntegerType intType, LongType longType, FloatType floatType, DoubleType doubleType, CharacterType characterType) { _encoder = encoder; _booleanType = boolType; _byteType = byteType; _shortType = shortType; _integerType = intType; _longType = longType; _floatType = floatType; _doubleType = doubleType; _characterType = characterType; _arrayEncoding = new AllArrayEncoding(encoder, decoder); _shortArrayEncoding = new ShortArrayEncoding(encoder, decoder); encoder.register(Object[].class, this); decoder.register(this); }
public ArrayType(EncoderImpl encoder, final DecoderImpl decoder, BooleanType boolType, ByteType byteType, ShortType shortType, IntegerType intType, LongType longType, FloatType floatType, DoubleType doubleType, CharacterType characterType) { _encoder = encoder; _booleanType = boolType; _byteType = byteType; _shortType = shortType; _integerType = intType; _longType = longType; _floatType = floatType; _doubleType = doubleType; _characterType = characterType; _arrayEncoding = new AllArrayEncoding(encoder, decoder); _shortArrayEncoding = new ShortArrayEncoding(encoder, decoder); encoder.register(Object[].class, this); decoder.register(this); }
public ArrayType(EncoderImpl encoder, final DecoderImpl decoder, BooleanType boolType, ByteType byteType, ShortType shortType, IntegerType intType, LongType longType, FloatType floatType, DoubleType doubleType, CharacterType characterType) { _encoder = encoder; _booleanType = boolType; _byteType = byteType; _shortType = shortType; _integerType = intType; _longType = longType; _floatType = floatType; _doubleType = doubleType; _characterType = characterType; _arrayEncoding = new AllArrayEncoding(encoder, decoder); _shortArrayEncoding = new ShortArrayEncoding(encoder, decoder); encoder.register(Object[].class, this); decoder.register(this); }
public ArrayType(EncoderImpl encoder, final DecoderImpl decoder, BooleanType boolType, ByteType byteType, ShortType shortType, IntegerType intType, LongType longType, FloatType floatType, DoubleType doubleType, CharacterType characterType) { _encoder = encoder; _booleanType = boolType; _byteType = byteType; _shortType = shortType; _integerType = intType; _longType = longType; _floatType = floatType; _doubleType = doubleType; _characterType = characterType; _arrayEncoding = new AllArrayEncoding(encoder, decoder); _shortArrayEncoding = new ShortArrayEncoding(encoder, decoder); encoder.register(Object[].class, this); decoder.register(this); }
@Override public void writeValue(final float[] a) { FloatType.FloatEncoding underlyingEncoder = getUnderlyingEncoding(a); byte encodedValueSize = (byte)(1 + underlyingEncoder.getConstructorSize() + a.length * underlyingEncoder.getValueSize(null)); getEncoder().getBuffer().ensureRemaining(encodedValueSize); getEncoder().writeRaw(encodedValueSize); getEncoder().writeRaw((byte)a.length); underlyingEncoder.writeConstructor(); for(float b : a) { underlyingEncoder.writeValue(b); } }
@Override public void writeValue(final long[] a) { LongType.LongEncoding underlyingEncoder = getUnderlyingEncoding(a); byte encodedValueSize = (byte)(1 + underlyingEncoder.getConstructorSize() + a.length * underlyingEncoder.getValueSize(null)); getEncoder().getBuffer().ensureRemaining(encodedValueSize); getEncoder().writeRaw(encodedValueSize); getEncoder().writeRaw((byte)a.length); underlyingEncoder.writeConstructor(); for(long b : a) { underlyingEncoder.writeValue(b); } }
@Override public void writeValue(final short[] a) { ShortType.ShortEncoding underlyingEncoder = getUnderlyingEncoding(a); byte encodedValueSize = (byte)(1 + underlyingEncoder.getConstructorSize() + a.length * underlyingEncoder.getValueSize(null)); getEncoder().getBuffer().ensureRemaining(encodedValueSize); getEncoder().writeRaw(encodedValueSize); getEncoder().writeRaw((byte)a.length); underlyingEncoder.writeConstructor(); for(short b : a) { underlyingEncoder.writeValue(b); } }
@Override public void writeValue(final char[] a) { CharacterType.CharacterEncoding underlyingEncoder = getUnderlyingEncoding(a); byte encodedValueSize = (byte)(1 + underlyingEncoder.getConstructorSize() + a.length * underlyingEncoder.getValueSize(null)); getEncoder().getBuffer().ensureRemaining(encodedValueSize); getEncoder().writeRaw(encodedValueSize); getEncoder().writeRaw((byte)a.length); underlyingEncoder.writeConstructor(); for(char b : a) { underlyingEncoder.writeValue(b); } }
@Override public void writeValue(final boolean[] a) { BooleanType.BooleanEncoding underlyingEncoder = getUnderlyingEncoding(a); byte encodedValueSize = (byte)(1 + underlyingEncoder.getConstructorSize() + a.length * underlyingEncoder.getValueSize(null)); getEncoder().getBuffer().ensureRemaining(encodedValueSize); getEncoder().writeRaw(encodedValueSize); getEncoder().writeRaw((byte)a.length); underlyingEncoder.writeConstructor(); for(boolean b : a) { underlyingEncoder.writeValue(b); } }
public boolean encodesSuperset(final TypeEncoding<Object[]> encoding) { return getType() == encoding.getType(); }
@Override public void writeValue(final double[] a) { DoubleType.DoubleEncoding underlyingEncoder = getUnderlyingEncoding(a); byte encodedValueSize = (byte)(1 + underlyingEncoder.getConstructorSize() + a.length * underlyingEncoder.getValueSize(null)); getEncoder().getBuffer().ensureRemaining(encodedValueSize); getEncoder().writeRaw(encodedValueSize); getEncoder().writeRaw((byte)a.length); underlyingEncoder.writeConstructor(); for(double b : a) { underlyingEncoder.writeValue(b); } }
@Override public void writeValue(final int[] a) { IntegerType.IntegerEncoding underlyingEncoder = getUnderlyingEncoding(a); byte encodedValueSize = (byte)(1 + underlyingEncoder.getConstructorSize() + a.length * underlyingEncoder.getValueSize(null)); getEncoder().getBuffer().ensureRemaining(encodedValueSize); getEncoder().writeRaw(encodedValueSize); getEncoder().writeRaw((byte)a.length); underlyingEncoder.writeConstructor(); for(int b : a) { underlyingEncoder.writeValue(b); } }
@Override public void writeValue(final byte[] a) { ByteType.ByteEncoding underlyingEncoder = getUnderlyingEncoding(a); byte encodedValueSize = (byte)(1 + underlyingEncoder.getConstructorSize() + a.length * underlyingEncoder.getValueSize(null)); getEncoder().getBuffer().ensureRemaining(encodedValueSize); getEncoder().writeRaw(encodedValueSize); underlyingEncoder.writeConstructor(); for(byte b : a) { underlyingEncoder.writeValue(b); } }
public boolean encodesSuperset(final TypeEncoding<Object[]> encoding) { return getType() == encoding.getType(); }
public boolean encodesSuperset(final TypeEncoding<Object[]> encoding) { return getType() == encoding.getType(); }
public void writeValue(final short[] a) { ShortType.ShortEncoding underlyingEncoder = getUnderlyingEncoding(a); getEncoder().writeRaw((byte)(1 + underlyingEncoder.getConstructorSize() + a.length*underlyingEncoder.getValueSize(null))); getEncoder().writeRaw((byte)a.length); underlyingEncoder.writeConstructor(); for(short b : a) { underlyingEncoder.writeValue(b); } }