Esempio n. 1
0
 private void readObject(ObjectInputStream is) throws ClassNotFoundException, IOException {
   this.string = (String) is.readObject();
   try {
     parseURI(this.string);
   } catch (URISyntaxException x) {
     // Should not happen.
     throw new RuntimeException(x);
   }
 }
Esempio n. 2
0
 /**
  * Creates an URI from the given string
  *
  * @param str The string to create the URI from
  * @exception URISyntaxException If the given string violates RFC 2396
  * @exception NullPointerException If str is null
  */
 public URI(String str) throws URISyntaxException {
   this.string = str;
   parseURI(str);
 }