本文整理了Java中io.jenetics.jpx.ZonedDateTimes.read()
方法的一些代码示例,展示了ZonedDateTimes.read()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。ZonedDateTimes.read()
方法的具体详情如下:
包路径:io.jenetics.jpx.ZonedDateTimes
类名称:ZonedDateTimes
方法名:read
暂无
代码示例来源:origin: jenetics/jpx
@Test
public void readWriteZonedDateTime() throws IOException {
final Random random = new Random();
for (int i = 0; i < 1000; ++i) {
final ZonedDateTime zdt = nextZonedDataTime(random);
final ByteArrayOutputStream bout = new ByteArrayOutputStream();
final DataOutputStream dout = new DataOutputStream(bout);
ZonedDateTimes.write(zdt, dout);
final ByteArrayInputStream bin = new ByteArrayInputStream(bout.toByteArray());
final DataInputStream din = new DataInputStream(bin);
final ZonedDateTime read = ZonedDateTimes.read(din);
Assert.assertEquals(read, zdt);
}
}
代码示例来源:origin: jenetics/jpx
static WayPoint read(final DataInput in) throws IOException {
final int existing = in.readInt();
return new WayPoint(
Latitude.ofDegrees(in.readDouble()),
Longitude.ofDegrees(in.readDouble()),
((existing & (1 << 0)) != 0) ? Length.read(in) : null,
((existing & (1 << 1)) != 0) ? Speed.read(in) : null,
((existing & (1 << 2)) != 0) ? ZonedDateTimes.read(in) : null,
((existing & (1 << 3)) != 0) ? Degrees.read(in) : null,
((existing & (1 << 4)) != 0) ? Length.read(in) : null,
((existing & (1 << 5)) != 0) ? IO.readString(in) : null,
((existing & (1 << 6)) != 0) ? IO.readString(in) : null,
((existing & (1 << 7)) != 0) ? IO.readString(in) : null,
((existing & (1 << 8)) != 0) ? IO.readString(in) : null,
((existing & (1 << 9)) != 0) ? IO.reads(Link::read, in) : null,
((existing & (1 << 10)) != 0) ? IO.readString(in) : null,
((existing & (1 << 11)) != 0) ? IO.readString(in) : null,
((existing & (1 << 12)) != 0) ? Fix.valueOf(IO.readString(in)) : null,
((existing & (1 << 13)) != 0) ? UInt.read(in) : null,
((existing & (1 << 14)) != 0) ? in.readDouble() : null,
((existing & (1 << 15)) != 0) ? in.readDouble() : null,
((existing & (1 << 16)) != 0) ? in.readDouble() : null,
((existing & (1 << 17)) != 0) ? Duration.ofMillis(in.readLong()) : null,
((existing & (1 << 18)) != 0) ? DGPSStation.read(in) : null,
((existing & (1 << 19)) != 0) ? Degrees.read(in) : null
);
}
内容来源于网络,如有侵权,请联系作者删除!