/** * Returns the content of this URI as a string. * * <p> If this URI was created by invoking one of the constructors in this * class then a string equivalent to the original input string, or to the * string computed from the originally-given components, as appropriate, is * returned. Otherwise this URI was created by normalization, resolution, * or relativization, and so a string is constructed from this URI's * components according to the rules specified in <a * href="http://www.ietf.org/rfc/rfc2396.txt">RFC 2396</a>, * section 5.2, step 7. </p> * * @return The string form of this URI */ public String toString() { defineString(); return string; }
/** * Returns the content of this URI as a string. * * <p> If this URI was created by invoking one of the constructors in this * class then a string equivalent to the original input string, or to the * string computed from the originally-given components, as appropriate, is * returned. Otherwise this URI was created by normalization, resolution, * or relativization, and so a string is constructed from this URI's * components according to the rules specified in <a * href="http://www.ietf.org/rfc/rfc2396.txt">RFC 2396</a>, * section 5.2, step 7. </p> * * @return The string form of this URI */ public String toString() { defineString(); return string; }
/** * Returns the content of this URI as a string. * * <p> If this URI was created by invoking one of the constructors in this * class then a string equivalent to the original input string, or to the * string computed from the originally-given components, as appropriate, is * returned. Otherwise this URI was created by normalization, resolution, * or relativization, and so a string is constructed from this URI's * components according to the rules specified in <a * href="http://www.ietf.org/rfc/rfc2396.txt">RFC 2396</a>, * section 5.2, step 7. </p> * * @return The string form of this URI */ public String toString() { defineString(); return string; }
/** * Saves the content of this URI to the given serial stream. * * <p> The only serializable field of a URI instance is its <tt>string</tt> * field. That field is given a value, if it does not have one already, * and then the {@link java.io.ObjectOutputStream#defaultWriteObject()} * method of the given object-output stream is invoked. </p> * * @param os The object-output stream to which this object * is to be written */ private void writeObject(ObjectOutputStream os) throws IOException { defineString(); os.defaultWriteObject(); // Writes the string field only }
/** * Saves the content of this URI to the given serial stream. * * <p> The only serializable field of a URI instance is its <tt>string</tt> * field. That field is given a value, if it does not have one already, * and then the {@link java.io.ObjectOutputStream#defaultWriteObject()} * method of the given object-output stream is invoked. </p> * * @param os The object-output stream to which this object * is to be written */ private void writeObject(ObjectOutputStream os) throws IOException { defineString(); os.defaultWriteObject(); // Writes the string field only }
/** * Returns the content of this URI as a US-ASCII string. * * <p> If this URI does not contain any characters in the <i>other</i> * category then an invocation of this method will return the same value as * an invocation of the {@link #toString() toString} method. Otherwise * this method works as if by invoking that method and then <a * href="#encode">encoding</a> the result. </p> * * @return The string form of this URI, encoded as needed * so that it only contains characters in the US-ASCII * charset */ public String toASCIIString() { defineString(); return encode(string); }
/** * Returns the content of this URI as a US-ASCII string. * * <p> If this URI does not contain any characters in the <i>other</i> * category then an invocation of this method will return the same value as * an invocation of the {@link #toString() toString} method. Otherwise * this method works as if by invoking that method and then <a * href="#encode">encoding</a> the result. </p> * * @return The string form of this URI, encoded as needed * so that it only contains characters in the US-ASCII * charset */ public String toASCIIString() { defineString(); return encode(string); }
/** * Returns the content of this URI as a US-ASCII string. * * <p> If this URI does not contain any characters in the <i>other</i> * category then an invocation of this method will return the same value as * an invocation of the {@link #toString() toString} method. Otherwise * this method works as if by invoking that method and then <a * href="#encode">encoding</a> the result. </p> * * @return The string form of this URI, encoded as needed * so that it only contains characters in the US-ASCII * charset */ public String toASCIIString() { defineString(); return encode(string); }
defineString(); new Parser(string).parse(true); return this;
defineString(); new Parser(string).parse(true); return this;
defineString(); new Parser(string).parse(true); return this;