@Test public void testToBytes() { assertArrayEquals(new byte[] {51, 127, -104, 0}, DurationConverter.INSTANCE.toBytes(Duration.ofDays(10))); }
@Override public byte[] toBytes(Duration value) { return longConverter.toBytes(value.toMillis()); }
DurationConverter implements BytesConverter<Duration> { @Override public byte[] toBytes(Duration value) { return longConverter.toBytes(value.toMillis()); } }
DurationConverter implements BytesConverter<Duration> { @Override public byte[] toBytes(Duration value) { return longConverter.toBytes(value.toMillis()); } DurationConverter(BytesConverter<Long> longConverter); }
DurationConverter implements BytesConverter<Duration> { @Override public byte[] toBytes(Duration value) { return longConverter.toBytes(value.toMillis()); } DurationConverter(BytesConverter<Long> longConverter); @Override Duration fromBytes(byte[] bytes); @Override byte[] toBytes(Duration value); }
DurationConverter implements BytesConverter<Duration> { @Override public byte[] toBytes(Duration value) { return longConverter.toBytes(value.toMillis()); } DurationConverter(BytesConverter<Long> longConverter); @Override Duration fromBytes(byte[] bytes); @Override byte[] toBytes(Duration value); static final BytesConverter<Duration> INSTANCE; }