FileDocCategorySizeDatePackage
SerialDatalink.javaAPI DocJava SE 5 API2592Fri Aug 26 14:57:52 BST 2005javax.sql.rowset.serial

SerialDatalink

public class SerialDatalink extends Object implements Serializable, Cloneable
A serialized mapping in the Java programming language of an SQL DATALINK value. A DATALINK value references a file outside of the underlying data source that the data source manages.

RowSet implementations can use the method RowSet.getURL to retrieve a java.net.URL object, which can be used to manipulate the external data.

java.net.URL url = rowset.getURL(1);

Fields Summary
private URL
url
The extracted URL field retrieved from the DATALINK field.
private int
baseType
The SQL type of the elements in this SerialDatalink object. The type is expressed as one of the contants from the class java.sql.Types.
private String
baseTypeName
The type name used by the DBMS for the elements in the SQL DATALINK value that this SerialDatalink object represents.
static final long
serialVersionUID
The identifier that assists in the serialization of this SerialDatalink object.
Constructors Summary
public SerialDatalink(URL url)
Constructs a new SerialDatalink object from the given java.net.URL object.

throws
SerialException if url parameter is a null

	if (url == null) {
	    throw new SerialException("Cannot serialize empty URL instance");
	}
	this.url = url;
    
Methods Summary
public java.net.URLgetDatalink()
Returns a new URL that is a copy of this SerialDatalink object.

return
a copy of this SerialDatalink object as a URL object in the Java programming language.
throws
SerialException if the URL object cannot be de-serialized


	URL aURL = null;

	try {
	    aURL = new URL((this.url).toString());
	} catch (java.net.MalformedURLException e) {
	    throw new SerialException("MalformedURLException: " + e.getMessage());
	}
	return aURL;