MCPcopy Create free account
hub / github.com/MenoData/Time4J / writeTimestamp

Method writeTimestamp

base/src/main/java/net/time4j/Moment.java:2261–2284  ·  view source on GitHub ↗

Serialisierungsmethode. @param out output stream @throws IOException in case of I/O-errors

(DataOutput out)

Source from the content-addressed store, hash-verified

2259 * @throws IOException in case of I/O-errors
2260 */
2261 void writeTimestamp(DataOutput out)
2262 throws IOException {
2263
2264 int header = SPX.MOMENT_TYPE;
2265 header <<= 4;
2266
2267 if (this.isPositiveLS()) {
2268 header |= 1;
2269 }
2270
2271 int fp = this.getNanosecond();
2272
2273 if (fp > 0) {
2274 header |= 2;
2275 }
2276
2277 out.writeByte(header);
2278 out.writeLong(this.posixTime);
2279
2280 if (fp > 0) {
2281 out.writeInt(fp);
2282 }
2283
2284 }
2285
2286 /**
2287 * Deserialisierungsmethode.

Callers 1

writeMomentMethod · 0.95

Calls 2

isPositiveLSMethod · 0.95
getNanosecondMethod · 0.95

Tested by

no test coverage detected