Skip to content

Most visited

Recently visited

navigation
Added in API level 1

SQLOutput

public interface SQLOutput

java.sql.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 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 writeNClob(NClob theNClob)

Write a Clob into the output stream as an SQL NCLOB.

abstract void writeNString(String theString)

Write a String into the output stream as an SQL NCHAR, NVARCHAR, or LONGNVARCHAR.

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 writeRowId(RowId theRowId)

Write a RowId into the output stream as an SQL ROWID.

abstract void writeSQLXML(SQLXML theXml)

Write a SQLXML into the output stream as an SQL XML.

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 a URL into the output stream as an SQL DATALINK.

Public methods

writeArray

Added in API level 1
void writeArray (Array theArray)

Write an SQL Array value into the output stream.

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

See also:

writeAsciiStream

Added in API level 1
void writeAsciiStream (InputStream theStream)

Write a stream of ASCII characters into the output stream.

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

writeBigDecimal

Added in API level 1
void writeBigDecimal (BigDecimal theBigDecimal)

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

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

writeBinaryStream

Added in API level 1
void writeBinaryStream (InputStream theStream)

Write a stream of uninterpreted bytes into the output stream.

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

writeBlob

Added in API level 1
void writeBlob (Blob theBlob)

Write an SQL Blob value into the output stream.

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

See also:

writeBoolean

Added in API level 1
void writeBoolean (boolean theFlag)

Write a boolean value into the output stream.

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

writeByte

Added in API level 1
void writeByte (byte theByte)

Write a byte value into the output stream.

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

writeBytes

Added in API level 1
void writeBytes (byte[] theBytes)

Write an array of bytes into the output stream.

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

writeCharacterStream

Added in API level 1
void writeCharacterStream (Reader theStream)

Write a stream of unicode characters into the output stream.

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

writeClob

Added in API level 1
void writeClob (Clob theClob)

Write an SQL Clob value into the output stream.

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

See also:

writeDate

Added in API level 1
void writeDate (Date theDate)

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

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

See also:

writeDouble

Added in API level 1
void writeDouble (double theDouble)

Write a double value into the output stream.

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

writeFloat

Added in API level 1
void writeFloat (float theFloat)

Write a float value into the output stream.

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

writeInt

Added in API level 1
void writeInt (int theInt)

Write an int value into the output stream.

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

writeLong

Added in API level 1
void writeLong (long theLong)

Write a long value into the output stream.

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

writeNClob

Added in API level 9
void writeNClob (NClob theNClob)

Write a Clob into the output stream as an SQL NCLOB.

Parameters
theNClob NClob: the java.sql.Clob object to write.
Throws
SQLException if a database error occurs.

writeNString

Added in API level 9
void writeNString (String theString)

Write a String into the output stream as an SQL NCHAR, NVARCHAR, or LONGNVARCHAR.

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

writeObject

Added in API level 1
void writeObject (SQLData theObject)

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 SQLData: the SQLData object to write.
Throws
SQLException if a database error occurs.

See also:

writeRef

Added in API level 1
void writeRef (Ref theRef)

Write an SQL Ref value into the output stream.

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

See also:

writeRowId

Added in API level 9
void writeRowId (RowId theRowId)

Write a RowId into the output stream as an SQL ROWID.

Parameters
theRowId RowId: the java.sql.RowId object to write.
Throws
SQLException if a database error occurs.

writeSQLXML

Added in API level 9
void writeSQLXML (SQLXML theXml)

Write a SQLXML into the output stream as an SQL XML.

Parameters
theXml SQLXML: the java.sql.SQLXML object to write.
Throws
SQLException if a database error occurs.

writeShort

Added in API level 1
void writeShort (short theShort)

Write a short value into the output stream.

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

writeString

Added in API level 1
void writeString (String theString)

Write a String value into the output stream.

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

writeStruct

Added in API level 1
void writeStruct (Struct theStruct)

Write an SQL Struct value into the output stream.

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

See also:

writeTime

Added in API level 1
void writeTime (Time theTime)

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

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

See also:

writeTimestamp

Added in API level 1
void writeTimestamp (Timestamp theTimestamp)

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

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

See also:

writeURL

Added in API level 1
void writeURL (URL theURL)

Write a URL into the output stream as an SQL DATALINK.

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

See also:

This site uses cookies to store your preferences for site-specific language and display options.

Hooray!

This class requires API level or higher

This doc is hidden because your selected API level for the documentation is . You can change the documentation API level with the selector above the left navigation.

For more information about specifying the API level your app requires, read Supporting Different Platform Versions.