Java™ Platform
Standard Ed. 8
- Summary:
- Nested |
- Field |
- Constr |
- Method
- Detail:
- Field |
- Constr |
- Method
compact2, compact3
java.sql
Interface SQLOutput
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods
| Modifier and Type |
Method |
Description |
void |
writeArray(Array x) |
Writes an SQL ARRAY value to the stream.
|
void |
writeAsciiStream(InputStream x) |
Writes the next attribute to the stream as a stream of ASCII characters.
|
void |
writeBigDecimal(BigDecimal x) |
Writes the next attribute to the stream as a java.math.BigDecimal object.
|
void |
writeBinaryStream(InputStream x) |
Writes the next attribute to the stream as a stream of uninterpreted
bytes.
|
void |
writeBlob(Blob x) |
Writes an SQL BLOB value to the stream.
|
void |
writeBoolean(boolean x) |
Writes the next attribute to the stream as a Java boolean.
|
void |
writeByte(byte x) |
Writes the next attribute to the stream as a Java byte.
|
void |
writeBytes(byte[] x) |
Writes the next attribute to the stream as an array of bytes.
|
void |
writeCharacterStream(Reader x) |
Writes the next attribute to the stream as a stream of Unicode characters.
|
void |
writeClob(Clob x) |
Writes an SQL CLOB value to the stream.
|
void |
writeDate(Date x) |
Writes the next attribute to the stream as a java.sql.Date object.
|
void |
writeDouble(double x) |
Writes the next attribute to the stream as a Java double.
|
void |
writeFloat(float x) |
Writes the next attribute to the stream as a Java float.
|
void |
writeInt(int x) |
Writes the next attribute to the stream as a Java int.
|
void |
writeLong(long x) |
Writes the next attribute to the stream as a Java long.
|
void |
writeNClob(NClob x) |
Writes an SQL NCLOB value to the stream.
|
void |
writeNString(String x) |
Writes the next attribute to the stream as a String
in the Java programming language.
|
default void |
writeObject(Object x,
SQLType targetSqlType) |
Writes to the stream the data contained in the given object.
|
void |
writeObject(SQLData x) |
Writes to the stream the data contained in the given
SQLData object.
|
void |
writeRef(Ref x) |
Writes an SQL REF value to the stream.
|
void |
writeRowId(RowId x) |
Writes an SQL ROWID value to the stream.
|
void |
writeShort(short x) |
Writes the next attribute to the stream as a Java short.
|
void |
writeSQLXML(SQLXML x) |
Writes an SQL XML value to the stream.
|
void |
writeString(String x) |
Writes the next attribute to the stream as a String
in the Java programming language.
|
void |
writeStruct(Struct x) |
Writes an SQL structured type value to the stream.
|
void |
writeTime(Time x) |
Writes the next attribute to the stream as a java.sql.Time object.
|
void |
writeTimestamp(Timestamp x) |
Writes the next attribute to the stream as a java.sql.Timestamp object.
|
void |
writeURL(URL x) |
Writes a SQL DATALINK value to the stream.
|
-
-
Method Detail
-
writeBigDecimal
void writeBigDecimal(BigDecimal x)
throws SQLException
Writes the next attribute to the stream as a java.math.BigDecimal object.
Writes the next attribute to the stream as a String
in the Java programming language.
- Parameters:
x - the value to pass to the database
- Throws:
SQLException - if a database access error occurs
SQLFeatureNotSupportedException - if the JDBC driver does not support
this method
- Since:
- 1.2
-
writeDate
void writeDate(Date x)
throws SQLException
Writes the next attribute to the stream as a java.sql.Date object.
Writes the next attribute to the stream as a java.sql.Date object
in the Java programming language.
- Parameters:
x - the value to pass to the database
- Throws:
SQLException - if a database access error occurs
SQLFeatureNotSupportedException - if the JDBC driver does not support
this method
- Since:
- 1.2
-
writeTime
void writeTime(Time x)
throws SQLException
Writes the next attribute to the stream as a java.sql.Time object.
Writes the next attribute to the stream as a java.sql.Date object
in the Java programming language.
- Parameters:
x - the value to pass to the database
- Throws:
SQLException - if a database access error occurs
SQLFeatureNotSupportedException - if the JDBC driver does not support
this method
- Since:
- 1.2
-
writeTimestamp
void writeTimestamp(Timestamp x)
throws SQLException
Writes the next attribute to the stream as a java.sql.Timestamp object.
Writes the next attribute to the stream as a java.sql.Date object
in the Java programming language.
- Parameters:
x - the value to pass to the database
- Throws:
SQLException - if a database access error occurs
SQLFeatureNotSupportedException - if the JDBC driver does not support
this method
- Since:
- 1.2
-
writeObject
void writeObject(SQLData x)
throws SQLException
Writes to the stream the data contained in the given
SQLData object.
When the SQLData object is null, this
method writes an SQL NULL to the stream.
Otherwise, it calls the SQLData.writeSQL
method of the given object, which
writes the object's attributes to the stream.
The implementation of the method SQLData.writeSQL
calls the appropriate SQLOutput writer method(s)
for writing each of the object's attributes in order.
The attributes must be read from an SQLInput
input stream and written to an SQLOutput
output stream in the same order in which they were
listed in the SQL definition of the user-defined type.
- Parameters:
x - the object representing data of an SQL structured or
distinct type
- Throws:
SQLException - if a database access error occurs
SQLFeatureNotSupportedException - if the JDBC driver does not support
this method
- Since:
- 1.2
-
writeNString
void writeNString(String x)
throws SQLException
Writes the next attribute to the stream as a String
in the Java programming language. The driver converts this to a
SQL NCHAR or
NVARCHAR or LONGNVARCHAR value
(depending on the argument's
size relative to the driver's limits on NVARCHAR values)
when it sends it to the stream.
- Parameters:
x - the value to pass to the database
- Throws:
SQLException - if a database access error occurs
SQLFeatureNotSupportedException - if the JDBC driver does not support
this method
- Since:
- 1.6
Java™ Platform
Standard Ed. 8
- Summary:
- Nested |
- Field |
- Constr |
- Method
- Detail:
- Field |
- Constr |
- Method
Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2026, Oracle and/or its affiliates. All rights reserved. Use is subject to license terms. Also see the documentation redistribution policy.