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 Timestamp
Reads a possibly-null
Timestamp
.static UnmodifiableTimestamp
Reads a possibly-null
UnmodifiableTimestamp
.static Timestamp
Reads aTimestamp
, maintaining the full nanosecond precision.static UnmodifiableTimestamp
Reads anUnmodifiableTimestamp
, maintaining the full nanosecond precision.static void
writeNullTimestamp
(Timestamp ts, DataOutputStream out) Writes a possibly-null
Timestamp
.static void
writeTimestamp
(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-null
Timestamp
.- 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-null
UnmodifiableTimestamp
.- 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 int
number of nanoseconds.This is deliberately compatible with
Instant
that is part of Java 8. Once Java 8 is our minimum Java version, many uses ofTimestamp
will change toInstant
.- Throws:
IOException
-
writeNullTimestamp
Writes a possibly-null
Timestamp
.- Throws:
IOException
- See Also:
-