code: public final void setValue(final String aValue) throws
              URISyntaxException {
  
          // determine if ATTACH is a URI or an embedded
          // binary..
          if (getParameter(Parameter.ENCODING) != null) {
              // binary = Base64.decode(aValue);
              try {
                  final BinaryDecoder decoder = DecoderFactory.getInstance()
                          .createBinaryDecoder(
                                  getParameter(Parameter.ENCODING));
                  binary = decoder.decode(aValue.getBytes());
              } catch (UnsupportedEncodingException uee) {
                  Logger log = LoggerFactory.getLogger(Attach.class);
                  log.error("Error encoding binary data", uee);
              } catch (DecoderException de) {
                  Logger log = LoggerFactory.getLogger(Attach.class);
                  log.error("Error decoding binary data", de);
              }
          }
          // assume URI..
          else {
              uri = Uris.create(aValue);
          }
      }
docs: Sets the current value of the Attach instance. If the specified
  value is encoded binary data, the value is decoded and stored in
  the binary field. Otherwise the value is assumed to be a URI
  location to binary data and is stored as such.
  
  @param aValue a string encoded binary or URI value
  @throws URISyntaxException where the specified value is not a valid URI