FileDocCategorySizeDatePackage
SQLOutput.javaAPI DocAndroid 1.5 API10317Wed May 06 22:41:06 BST 2009java.sql

SQLOutput

public interface SQLOutput
The interface for an output stream used to write attributes of an SQL User Defined Type (UDT) to the database. This interface is used for custom mapping of types and is called by the JDBC driver. It is not intended to be used by applications.

When an object which implements the {@code SQLData} interface is used as an argument to an SQL statement, the JDBC driver calls the method {@code SQLData.getSQLType} to establish the type of the SQL UDT that is being passed. The driver then creates an {@code SQLOutput} stream and passes it to the {@code SQLData.writeSQL} method, which in turn uses the appropriate {@code SQLOutput} writer methods to write the data from the {@code SQLData} object into the stream according to the defined mapping.

see
SQLData
since
Android 1.0

Fields Summary
Constructors Summary
Methods Summary
public voidwriteArray(java.sql.Array theArray)
Write an SQL {@code Array} value into the output stream.

param
theArray the {@code java.sql.Array} object to write.
throws
SQLException if a database error occurs.
see
Array
since
Android 1.0

public voidwriteAsciiStream(java.io.InputStream theStream)
Write a stream of ASCII characters into the output stream.

param
theStream the stream of ASCII characters to write, as a {@code java.io.InputStream} object
throws
SQLException if a database error occurs.
since
Android 1.0

public voidwriteBigDecimal(java.math.BigDecimal theBigDecimal)
Write a {@code java.math.BigDecimal} value into the output stream.

param
theBigDecimal the {@code BigDecimal} value to write.
throws
SQLException if a database error occurs.
since
Android 1.0

public voidwriteBinaryStream(java.io.InputStream theStream)
Write a stream of uninterpreted bytes into the output stream.

param
theStream the stream of bytes to write, as a {@code java.io.InputStream} object
throws
SQLException if a database error occurs.
since
Android 1.0

public voidwriteBlob(java.sql.Blob theBlob)
Write an SQL {@code Blob} value into the output stream.

param
theBlob the {@code java.sql.Blob} object to write.
throws
SQLException if a database error occurs.
see
Blob
since
Android 1.0

public voidwriteBoolean(boolean theFlag)
Write a {@code boolean} value into the output stream.

param
theFlag the {@code boolean} value to write.
throws
SQLException if a database error occurs.
since
Android 1.0

public voidwriteByte(byte theByte)
Write a {@code byte} value into the output stream.

param
theByte the {@code byte} value to write.
throws
SQLException if a database error occurs.
since
Android 1.0

public voidwriteBytes(byte[] theBytes)
Write an array of bytes into the output stream.

param
theBytes the array of bytes to write.
throws
SQLException if a database error occurs.
since
Android 1.0

public voidwriteCharacterStream(java.io.Reader theStream)
Write a stream of unicode characters into the output stream.

param
theStream the stream of unicode characters to write, as a {@code java.io.Reader} object.
throws
SQLException if a database error occurs.
since
Android 1.0

public voidwriteClob(java.sql.Clob theClob)
Write an SQL {@code Clob} value into the output stream.

param
theClob the {@code java.sql.Clob} object to write.
throws
SQLException if a database error occurs.
see
Clob
since
Android 1.0

public voidwriteDate(java.sql.Date theDate)
Write a {@code java.sql.Date} value into the output stream.

param
theDate the {@code Date} value to write.
throws
SQLException if a database error occurs.
see
Date
since
Android 1.0

public voidwriteDouble(double theDouble)
Write a {@code double} value into the output stream.

param
theDouble the {@code double} value to write.
throws
SQLException if a database error occurs.
since
Android 1.0

public voidwriteFloat(float theFloat)
Write a {@code float} value into the output stream.

param
theFloat the {@code float} value to write.
throws
SQLException if a database error occurs.
since
Android 1.0

public voidwriteInt(int theInt)
Write an {@code int} value into the output stream.

param
theInt the {@code int} value to write.
throws
SQLException if a database error occurs.
since
Android 1.0

public voidwriteLong(long theLong)
Write a {@code long} value into the output stream.

param
theLong the {@code long} value to write.
throws
SQLException if a database error occurs.
since
Android 1.0

public voidwriteObject(java.sql.SQLData theObject)
Write an {@code SQLData} object into the output stream.

If the {@code SQLData} object is null, writes {@code NULL} to the stream.

Otherwise, calls the {@code SQLData.writeSQL} method of the object, which writes the object's attributes to the stream by calling the appropriate SQLOutput writer methods for each attribute, in order. The order of the attributes is the order they are listed in the SQL definition of the User Defined Type.

param
theObject the {@code SQLData} object to write.
throws
SQLException if a database error occurs.
see
SQLData
since
Android 1.0

public voidwriteRef(java.sql.Ref theRef)
Write an SQL {@code Ref} value into the output stream.

param
theRef the {@code java.sql.Ref} object to write.
throws
SQLException if a database error occurs.
see
Ref
since
Android 1.0

public voidwriteShort(short theShort)
Write a {@code short} value into the output stream.

param
theShort the {@code short} value to write.
throws
SQLException if a database error occurs.
since
Android 1.0

public voidwriteString(java.lang.String theString)
Write a {@code String} value into the output stream.

param
theString the {@code String} to write.
throws
SQLException if a database error occurs.
since
Android 1.0

public voidwriteStruct(java.sql.Struct theStruct)
Write an SQL {@code Struct} value into the output stream.

param
theStruct the {@code java.sql.Struct} object to write.
throws
SQLException if a database error occurs.
see
Struct
since
Android 1.0

public voidwriteTime(java.sql.Time theTime)
Write a {@code java.sql.Time} value into the output stream.

param
theTime the {@code Time} value to write.
throws
SQLException if a database error occurs.
see
Time
since
Android 1.0

public voidwriteTimestamp(java.sql.Timestamp theTimestamp)
Write a {@code java.sql.Timestamp} value into the output stream.

param
theTimestamp the {@code Timestamp} value to write.
throws
SQLException if a database error occurs.
see
Timestamp
since
Android 1.0

public voidwriteURL(java.net.URL theURL)
Write an SQL {@code DATALINK} value into the output stream.

param
theURL the datalink value as a {@code java.net.URL} to write.
throws
SQLException if a database error occurs.
see
java.net.URL
since
Android 1.0