MCPcopy Create free account
hub / github.com/amazon-ion/ion-java / printZ

Method printZ

src/main/java/com/amazon/ion/Timestamp.java:2180–2204  ·  view source on GitHub ↗

Prints to an Appendable the string representation (in Ion format) of this Timestamp in UTC. This method produces the same output as #toZString(). @param out not null @throws IOException propagated when the Appendable throws it. @throws IonException if the text r

(Appendable out)

Source from the content-addressed store, hash-verified

2178 * @see #print(Appendable)
2179 */
2180 public void printZ(Appendable out)
2181 throws IOException
2182 {
2183 switch (_precision)
2184 {
2185 case YEAR:
2186 case MONTH:
2187 case DAY:
2188 {
2189 assert _offset == UNKNOWN_OFFSET;
2190 // No need to adjust offset, we won't be using it.
2191 print(out);
2192 break;
2193 }
2194 case MINUTE:
2195 case SECOND:
2196 case FRACTION:
2197 {
2198 Timestamp ztime = this.clone();
2199 ztime._offset = UTC_OFFSET;
2200 ztime.print(out);
2201 break;
2202 }
2203 }
2204 }
2205
2206
2207 /**

Callers 1

toZStringMethod · 0.95

Calls 2

printMethod · 0.95
cloneMethod · 0.95

Tested by

no test coverage detected