public byte[] getEncoded() {
		try {
			byte[] versionBytes = new byte[]{(byte) majorVersion,
				(byte) releaseVersion};
			BERTLVObject versionObject = new BERTLVObject(VERSION_LDS_TAG,
					versionBytes);
			byte[] tagListAsBytes = new byte[tagList.size()];
			for (int i = 0; i < tagList.size(); i++) {
				int dgTag = tagList.get(i);
				tagListAsBytes[i] = (byte) dgTag;
			}
			BERTLVObject tagListObject = new BERTLVObject(TAG_LIST_TAG,
					tagListAsBytes);
			BERTLVObject[] value = null;
			if (sois == null || sois.length == 0) {
				value = new BERTLVObject[]{versionObject, tagListObject};
			} else {
				DERSequence[] soisArray = new DERSequence[sois.length];
				for (int i = 0; i < sois.length; i++) {
					soisArray[i] = sois[i].getDERSequence();
				}
				value = new BERTLVObject[]{
					versionObject,
					tagListObject,
					new BERTLVObject(SOI_TAG, new DERSet(soisArray)
					.getEncoded())};
			}
			BERTLVObject result = new BERTLVObject(EF_COM_TAG, value);
			result.reconstructLength();
			return result.getEncoded();
		} catch (Exception e) {
			e.printStackTrace();
			return null;
		}
	}