Since: API Level 1
public interface

SQLOutput

java.sql.SQLOutput

Class Overview

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 SQLData interface is used as an argument to an SQL statement, the JDBC driver calls the method SQLData.getSQLType to establish the type of the SQL UDT that is being passed. The driver then creates an SQLOutput stream and passes it to the SQLData.writeSQL method, which in turn uses the appropriate SQLOutput writer methods to write the data from the SQLData object into the stream according to the defined mapping.

See Also

Summary

Public Methods
abstract void writeArray(Array theArray)
Write an SQL Array value into the output stream.
abstract void writeAsciiStream(InputStream theStream)
Write a stream of ASCII characters into the output stream.
abstract void writeBigDecimal(BigDecimal theBigDecimal)
Write a java.math.BigDecimal value into the output stream.
abstract void writeBinaryStream(InputStream theStream)
Write a stream of uninterpreted bytes into the output stream.
abstract void writeBlob(Blob theBlob)
Write an SQL Blob value into the output stream.
abstract void writeBoolean(boolean theFlag)
Write a boolean value into the output stream.
abstract void writeByte(byte theByte)
Write a byte value into the output stream.
abstract void writeBytes(byte[] theBytes)
Write an array of bytes into the output stream.
abstract void writeCharacterStream(Reader theStream)
Write a stream of unicode characters into the output stream.
abstract void writeClob(Clob theClob)
Write an SQL Clob value into the output stream.
abstract void writeDate(Date theDate)
Write a java.sql.Date value into the output stream.
abstract void writeDouble(double theDouble)
Write a double value into the output stream.
abstract void writeFloat(float theFloat)
Write a float value into the output stream.
abstract void writeInt(int theInt)
Write an int value into the output stream.
abstract void writeLong(long theLong)
Write a long value into the output stream.
abstract void writeObject(SQLData theObject)
Write an SQLData object into the output stream.
abstract void writeRef(Ref theRef)
Write an SQL Ref value into the output stream.
abstract void writeShort(short theShort)
Write a short value into the output stream.
abstract void writeString(String theString)
Write a String value into the output stream.
abstract void writeStruct(Struct theStruct)
Write an SQL Struct value into the output stream.
abstract void writeTime(Time theTime)
Write a java.sql.Time value into the output stream.
abstract void writeTimestamp(Timestamp theTimestamp)
Write a java.sql.Timestamp value into the output stream.
abstract void writeURL(URL theURL)
Write an SQL DATALINK value into the output stream.

Public Methods

public abstract void writeArray (Array theArray)

Since: API Level 1

Write an SQL Array value into the output stream.

Parameters
theArray the java.sql.Array object to write.
Throws
SQLException if a database error occurs.
See Also

public abstract void writeAsciiStream (InputStream theStream)

Since: API Level 1

Write a stream of ASCII characters into the output stream.

Parameters
theStream the stream of ASCII characters to write, as a java.io.InputStream object
Throws
SQLException if a database error occurs.

public abstract void writeBigDecimal (BigDecimal theBigDecimal)

Since: API Level 1

Write a java.math.BigDecimal value into the output stream.

Parameters
theBigDecimal the BigDecimal value to write.
Throws
SQLException if a database error occurs.

public abstract void writeBinaryStream (InputStream theStream)

Since: API Level 1

Write a stream of uninterpreted bytes into the output stream.

Parameters
theStream the stream of bytes to write, as a java.io.InputStream object
Throws
SQLException if a database error occurs.

public abstract void writeBlob (Blob theBlob)

Since: API Level 1

Write an SQL Blob value into the output stream.

Parameters
theBlob the java.sql.Blob object to write.
Throws
SQLException if a database error occurs.
See Also

public abstract void writeBoolean (boolean theFlag)

Since: API Level 1

Write a boolean value into the output stream.

Parameters
theFlag the boolean value to write.
Throws
SQLException if a database error occurs.

public abstract void writeByte (byte theByte)

Since: API Level 1

Write a byte value into the output stream.

Parameters
theByte the byte value to write.
Throws
SQLException if a database error occurs.

public abstract void writeBytes (byte[] theBytes)

Since: API Level 1

Write an array of bytes into the output stream.

Parameters
theBytes the array of bytes to write.
Throws
SQLException if a database error occurs.

public abstract void writeCharacterStream (Reader theStream)

Since: API Level 1

Write a stream of unicode characters into the output stream.

Parameters
theStream the stream of unicode characters to write, as a java.io.Reader object.
Throws
SQLException if a database error occurs.

public abstract void writeClob (Clob theClob)

Since: API Level 1

Write an SQL Clob value into the output stream.

Parameters
theClob the java.sql.Clob object to write.
Throws
SQLException if a database error occurs.
See Also

public abstract void writeDate (Date theDate)

Since: API Level 1

Write a java.sql.Date value into the output stream.

Parameters
theDate the Date value to write.
Throws
SQLException if a database error occurs.
See Also

public abstract void writeDouble (double theDouble)

Since: API Level 1

Write a double value into the output stream.

Parameters
theDouble the double value to write.
Throws
SQLException if a database error occurs.

public abstract void writeFloat (float theFloat)

Since: API Level 1

Write a float value into the output stream.

Parameters
theFloat the float value to write.
Throws
SQLException if a database error occurs.

public abstract void writeInt (int theInt)

Since: API Level 1

Write an int value into the output stream.

Parameters
theInt the int value to write.
Throws
SQLException if a database error occurs.

public abstract void writeLong (long theLong)

Since: API Level 1

Write a long value into the output stream.

Parameters
theLong the long value to write.
Throws
SQLException if a database error occurs.

public abstract void writeObject (SQLData theObject)

Since: API Level 1

Write an SQLData object into the output stream.

If the SQLData object is null, writes NULL to the stream.

Otherwise, calls the 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.

Parameters
theObject the SQLData object to write.
Throws
SQLException if a database error occurs.
See Also

public abstract void writeRef (Ref theRef)

Since: API Level 1

Write an SQL Ref value into the output stream.

Parameters
theRef the java.sql.Ref object to write.
Throws
SQLException if a database error occurs.
See Also

public abstract void writeShort (short theShort)

Since: API Level 1

Write a short value into the output stream.

Parameters
theShort the short value to write.
Throws
SQLException if a database error occurs.

public abstract void writeString (String theString)

Since: API Level 1

Write a String value into the output stream.

Parameters
theString the String to write.
Throws
SQLException if a database error occurs.

public abstract void writeStruct (Struct theStruct)

Since: API Level 1

Write an SQL Struct value into the output stream.

Parameters
theStruct the java.sql.Struct object to write.
Throws
SQLException if a database error occurs.
See Also

public abstract void writeTime (Time theTime)

Since: API Level 1

Write a java.sql.Time value into the output stream.

Parameters
theTime the Time value to write.
Throws
SQLException if a database error occurs.
See Also

public abstract void writeTimestamp (Timestamp theTimestamp)

Since: API Level 1

Write a java.sql.Timestamp value into the output stream.

Parameters
theTimestamp the Timestamp value to write.
Throws
SQLException if a database error occurs.
See Also

public abstract void writeURL (URL theURL)

Since: API Level 1

Write an SQL DATALINK value into the output stream.

Parameters
theURL the datalink value as a java.net.URL to write.
Throws
SQLException if a database error occurs.
See Also