/** * {@inheritDoc} */ public final void setValue(final String aValue) throws URISyntaxException { calAddress = Uris.create(aValue); }
/** * {@inheritDoc} */ public final String toString() { return addresses.stream().map(a -> Strings.quote(Uris.decode(Strings.valueOf(a)))) .collect(Collectors.joining(",")); }
/** * Attempts to create a URI instance and will optionally swallow any resulting URISyntaxException depending on * configured {@link CompatibilityHints}. Will also automatically attempt encoding of the string representation for * greater compatibility. * @param s a string representation of a URI. * @return a URI instance, or null if a valid URI string is not specified and relaxed parsing is enabled. * @throws URISyntaxException if a valid URI string is not specified and relaxed parsing is disabled */ public static URI create(final String s) throws URISyntaxException { try { return new URI(encode(s)); } catch (URISyntaxException use) { if (CompatibilityHints .isHintEnabled(CompatibilityHints.KEY_RELAXED_PARSING)) { return null; } throw use; } } }
/** * {@inheritDoc} */ public final String toString() { final StringBuilder b = new StringBuilder(); for (final Iterator<URI> i = addresses.iterator(); i.hasNext();) { b.append(Strings.quote(Uris.decode(Strings.valueOf(i.next())))); if (i.hasNext()) { b.append(','); } } return b.toString(); }
/** * {@inheritDoc} */ public final void setValue(final String aValue) throws URISyntaxException { calAddress = Uris.create(aValue); }
/** * {@inheritDoc} */ public final String toString() { final StringBuffer b = new StringBuffer(); for (final Iterator i = addresses.iterator(); i.hasNext();) { b.append(Strings.quote(Uris.decode(Strings.valueOf(i.next())))); if (i.hasNext()) { b.append(','); } } return b.toString(); }
/** * Parses the specified string representation to create a list of addresses. * @param aValue a string representation of a list of addresses * @throws URISyntaxException where the specified string is not a valid representation */ public AddressList(final String aValue) throws URISyntaxException { addresses = new CopyOnWriteArrayList<>(); final StringTokenizer t = new StringTokenizer(aValue, ","); while (t.hasMoreTokens()) { try { addresses.add(new URI(Uris.encode(Strings .unquote(t.nextToken())))); } catch (URISyntaxException use) { // ignore invalid addresses if relaxed parsing is enabled.. if (!CompatibilityHints.isHintEnabled( CompatibilityHints.KEY_RELAXED_PARSING)) { throw use; } } } }
/** * {@inheritDoc} */ public final void setValue(final String aValue) throws URISyntaxException { calAddress = Uris.create(aValue); }
/** * {@inheritDoc} */ public final String toString() { final StringBuilder b = new StringBuilder(); for (final Iterator<URI> i = addresses.iterator(); i.hasNext();) { b.append(Strings.quote(Uris.decode(Strings.valueOf(i.next())))); if (i.hasNext()) { b.append(','); } } return b.toString(); }
/** * Parses the specified string representation to create a list of addresses. * @param aValue a string representation of a list of addresses * @throws URISyntaxException where the specified string is not a valid representation */ public AddressList(final String aValue) throws URISyntaxException { addresses = new CopyOnWriteArrayList<URI>(); final StringTokenizer t = new StringTokenizer(aValue, ","); while (t.hasMoreTokens()) { try { addresses.add(new URI(Uris.encode(Strings .unquote(t.nextToken())))); } catch (URISyntaxException use) { // ignore invalid addresses if relaxed parsing is enabled.. if (!CompatibilityHints.isHintEnabled( CompatibilityHints.KEY_RELAXED_PARSING)) { throw use; } } } }
/** * {@inheritDoc} */ public final void setValue(final String aValue) throws URISyntaxException { calAddress = Uris.create(aValue); }
/** * {@inheritDoc} */ public final String toString() { return addresses.stream().map(a -> Strings.quote(Uris.decode(Strings.valueOf(a)))) .collect(Collectors.joining(",")); }
/** * Parses the specified string representation to create a list of addresses. * @param aValue a string representation of a list of addresses * @throws URISyntaxException where the specified string is not a valid representation */ public AddressList(final String aValue) throws URISyntaxException { addresses = new CopyOnWriteArrayList<URI>(); final StringTokenizer t = new StringTokenizer(aValue, ","); while (t.hasMoreTokens()) { try { addresses.add(new URI(Uris.encode(Strings .unquote(t.nextToken())))); } catch (URISyntaxException use) { // ignore invalid addresses if relaxed parsing is enabled.. if (!CompatibilityHints.isHintEnabled( CompatibilityHints.KEY_RELAXED_PARSING)) { throw use; } } } }
/** * {@inheritDoc} */ public final void setValue(final String aValue) throws URISyntaxException { uri = Uris.create(aValue); }
/** * {@inheritDoc} */ public final String getValue() { return Uris.decode(Strings.valueOf(getUri())); }
/** * {@inheritDoc} */ public final void setValue(final String aValue) throws URISyntaxException { uri = Uris.create(aValue); }
/** * {@inheritDoc} */ public final String getValue() { return Uris.decode(Strings.valueOf(getCalAddress())); }