1 7 8 package javax.sql.rowset.serial; 9 10 import java.sql.*; 11 import java.io.*; 12 import java.net.URL ; 13 14 15 28 public class SerialDatalink implements Serializable, Cloneable { 29 30 34 private URL url; 35 36 42 private int baseType; 43 44 50 private String baseTypeName; 51 52 58 public SerialDatalink(URL url) throws SerialException { 59 if (url == null) { 60 throw new SerialException ("Cannot serialize empty URL instance"); 61 } 62 this.url = url; 63 } 64 65 73 public URL getDatalink() throws SerialException { 74 75 URL aURL = null; 76 77 try { 78 aURL = new URL ((this.url).toString()); 79 } catch (java.net.MalformedURLException e) { 80 throw new SerialException ("MalformedURLException: " + e.getMessage()); 81 } 82 return aURL; 83 } 84 85 86 90 static final long serialVersionUID = 2826907821828733626L; 91 } 92 | Popular Tags |