/** * Create an instance of {@link ProtectedByteArrayType } * */ public ProtectedByteArrayType createProtectedByteArrayType() { return new ProtectedByteArrayType(); }
private ProtectedByteArrayType unmarshalProtectedByteArray(PrimitiveXNodeImpl<String> prim, Class beanClass, ParsingContext pc) throws SchemaException { ProtectedByteArrayType protectedType = new ProtectedByteArrayType(); String stringValue = prim.getParsedValue(DOMUtil.XSD_STRING, String.class); if (stringValue == null) { return null; } try { protectedType.setClearValue(ArrayUtils.toObject(stringValue.getBytes("UTF-8"))); } catch (UnsupportedEncodingException e) { throw new SystemException("UTF-8 encoding is not supported", e); } return protectedType; } //endregion
@Override public void setClearBytes(byte[] bytes) { setClearValue(ArrayUtils.toObject(bytes)); }
@Override public byte[] getClearBytes() { return ArrayUtils.toPrimitive(getClearValue()); }
return new GuardedByteArray(((ProtectedByteArrayType) pval.getValue()).getClearBytes()); } else if (midPointRealValue instanceof PolyString) { return ((PolyString)midPointRealValue).getOrig();
/** * Create an instance of {@link ProtectedByteArrayType } * */ public ProtectedByteArrayType createProtectedByteArrayType() { return new ProtectedByteArrayType(); }
/** * Create an instance of {@link ProtectedByteArrayType } * */ public ProtectedByteArrayType createProtectedByteArrayType() { return new ProtectedByteArrayType(); }
private ProtectedByteArrayType unmarshalProtectedByteArray(MapXNodeImpl map, Class beanClass, ParsingContext pc) throws SchemaException { ProtectedByteArrayType protectedType = new ProtectedByteArrayType(); XNodeProcessorUtil.parseProtectedType(protectedType, map, prismContext, pc); return protectedType; }