/** * Return the serialized string form of the Atom date * @return the serialized string form of the date as specified by RFC4287 */ public String getValue() { return format(value); }
/** * Create a new Atom Date instance using the number of milliseconds since January 1, 1970, 00:00:00 GMT * * @param value The number of milliseconds since January 1, 1970, 00:00:00 GMT * @return The created AtomDate */ public static AtomDate valueOf(long value) { return new AtomDate(value); } }
@Override public String toString() { return getValue(); }
public AtomDate getValue() { if (value == null) { String v = getText(); if (v != null) { value = AtomDate.valueOf(v); } } return value; }
/** * Create an AtomDate using the serialized string format (e.g. 2003-12-13T18:30:02Z). * * @param value The serialized RFC3339 date/time value */ public AtomDate(String value) { this(parse(value)); }
public long getTime() { AtomDate ad = getValue(); return (ad != null) ? ad.getTime() : null; }
public Date getDate() { AtomDate ad = getValue(); return (ad != null) ? ad.getDate() : null; }
public Calendar getCalendar() { AtomDate ad = getValue(); return (ad != null) ? ad.getCalendar() : null; }
public Tombstone setWhen(AtomDate date) { return setWhen(date.toString()); }
@Override public String toString() { return getValue(); }
public AtomDate getValue() { AtomDate value = null; String v = getText(); if (v != null) { value = AtomDate.valueOf(v); } return value; }
/** * Sets the value of the Atom date using the serialized string form * * @param value The serialized string form of the date */ public AtomDate setValue(String value) { this.value = parse(value); return this; }
public long getTime() { AtomDate ad = getValue(); return (ad != null) ? ad.getTime() : null; }
public Date getDate() { AtomDate ad = getValue(); return (ad != null) ? ad.getDate() : null; }
public Calendar getCalendar() { AtomDate ad = getValue(); return (ad != null) ? ad.getCalendar() : null; }
/** * Return the serialized string form of the Atom date * * @return the serialized string form of the date as specified by RFC4287 */ public String getValue() { return format(value); }
private String generatePasswordDigest(String password, String nonce, AtomDate date) throws AuthenticationException { String temp = nonce + date.getValue() + password; try { MessageDigest md = MessageDigest.getInstance("SHA1"); return new String(Base64.encodeBase64(md.digest(temp.getBytes()))); } catch (Exception e) { throw new AuthenticationException(e.getMessage(), e); } }