java.lang.Object
com.aoapps.sql.SQLStreamables
Functions for sending SQL-related objects in support of
Streamable.- Author:
- AO Industries, Inc.
-
Method Summary
Modifier and TypeMethodDescriptionstatic TimestampReads a possibly-nullTimestamp.static UnmodifiableTimestampReads a possibly-nullUnmodifiableTimestamp.static TimestampReads aTimestamp, maintaining the full nanosecond precision.static UnmodifiableTimestampReads anUnmodifiableTimestamp, maintaining the full nanosecond precision.static voidwriteNullTimestamp(Timestamp ts, DataOutputStream out) Writes a possibly-nullTimestamp.static voidwriteTimestamp(Timestamp ts, DataOutputStream out) Writes aTimestamp, maintaining the full nanosecond precision.
-
Method Details
-
readTimestamp
Reads aTimestamp, maintaining the full nanosecond precision. Time zone offset is not maintained.See
writeTimestamp(java.sql.Timestamp, java.io.DataOutputStream)for wire protocol details.- Throws:
IOException
-
readNullTimestamp
Reads a possibly-nullTimestamp.- Throws:
IOException- See Also:
-
readUnmodifiableTimestamp
public static UnmodifiableTimestamp readUnmodifiableTimestamp(DataInputStream in) throws IOException Reads anUnmodifiableTimestamp, maintaining the full nanosecond precision. Time zone offset is not maintained.See
writeTimestamp(java.sql.Timestamp, java.io.DataOutputStream)for wire protocol details.- Throws:
IOException
-
readNullUnmodifiableTimestamp
public static UnmodifiableTimestamp readNullUnmodifiableTimestamp(DataInputStream in) throws IOException Reads a possibly-nullUnmodifiableTimestamp.- Throws:
IOException- See Also:
-
writeTimestamp
Writes aTimestamp, maintaining the full nanosecond precision. Time zone offset is not maintained.The wire protocol is
DataOutputStream.writeLong(long)number of seconds followed bycompressed intnumber of nanoseconds.This is deliberately compatible with
Instantthat is part of Java 8. Once Java 8 is our minimum Java version, many uses ofTimestampwill change toInstant.- Throws:
IOException
-
writeNullTimestamp
Writes a possibly-nullTimestamp.- Throws:
IOException- See Also:
-
