MCPcopy Index your code
hub / github.com/bcgit/bc-java / KMIPDateTime

Class KMIPDateTime

kmip/src/main/java/org/bouncycastle/kmip/wire/KMIPDateTime.java:5–41  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3import java.util.Date;
4
5public class KMIPDateTime
6 implements KMIPItem
7{
8 private final int tag;
9 private final long value;
10
11 public KMIPDateTime(int tag, Date value)
12 {
13 this.tag = tag;
14 this.value = value.getTime();
15 }
16
17 public int getTag()
18 {
19 return tag;
20 }
21
22 public byte getType()
23 {
24 return KMIPType.DATE_TIME;
25 }
26
27 public long getLength()
28 {
29 return 8;
30 }
31
32 public Object getValue()
33 {
34 return new Date(value);
35 }
36
37 public KMIPItem toKMIPItem()
38 {
39 return this;
40 }
41}

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected