void encode(ByteBuffer dst) {
        byte[] types = new byte[values.size()];
        for (int i = 0; i < types.length; i++) {
            types[i] = get(i).type();
        }
        dst.putInt(types.length);
        dst.put(types);
        for (int i = 0; i < types.length; i++) {
            get(i).encode(dst);
        }
    }
Encode this value sequence into the given buffer

@param dst where to encode this value sequence
jrt/src/com/yahoo/jrt/Values.java