public byte[] getEncoded() {
		if (isSourceConsistent) {
			return sourceObject.getEncoded();
		}
		try {
			Iterator<Integer> it = tagList.iterator();
			String tagValues = "";
			Vector<BERTLVObject> objs = new Vector<BERTLVObject>();
			while (it.hasNext()) {
				short tag = it.next().shortValue();
				tagValues += Hex.shortToHexString(tag);
				byte[] value = null;
				switch (tag) {
					case EMTRY_TAG:
						value = emtry.getBytes();
						break;
					default:
						break;
				}
				BERTLVObject o = new BERTLVObject(tag, value);
				objs.add(o);
			}

			BERTLVObject result = new BERTLVObject(EF_DG3_TAG,
					new BERTLVObject(TAGS_TAG, Hex.hexStringToBytes(tagValues)));

			Iterator<BERTLVObject> i = objs.iterator();
			while (i.hasNext()) {
				result.addSubObject(i.next());
			}
			result.reconstructLength();
			sourceObject = result;
			isSourceConsistent = true;
			return result.getEncoded();
		} catch (Exception e) {
			e.printStackTrace();
			return null;
		}
	}