code: public void setValueAsJava(final byte[] bytes) {
  	if (type.equals(QualifiedName_XSD_BASE64_BINARY)) {
  	    this.value=ProvFactory.getFactory().base64Encoding(bytes);
  	} else if (type.equals(QualifiedName_XSD_HEX_BINARY)) {
  	    this.value=ProvFactory.getFactory().hexEncoding(bytes);
  	}
      }
docs: Converts a byte array in base64 or hexadecimal according to specified type.
  
  @param bytes array of bytes to convert