Package de.cardcontact.tlv
Class GeneralizedTime
- java.lang.Object
-
- de.cardcontact.tlv.TLV
-
- de.cardcontact.tlv.PrimitiveTLV
-
- de.cardcontact.tlv.GeneralizedTime
-
- All Implemented Interfaces:
TreeNode
public class GeneralizedTime extends PrimitiveTLV
-
-
Field Summary
-
Fields inherited from class de.cardcontact.tlv.PrimitiveTLV
value
-
Fields inherited from class de.cardcontact.tlv.TLV
alternateLengthFormat, name, tag
-
-
Constructor Summary
Constructors Constructor Description GeneralizedTime(ParseBuffer pb)
Create object from parsing bufferGeneralizedTime(TLV tlv)
Copy constructor to convert PrimitiveTLV to typed object Make sure, that the parent is updated with the new referenceGeneralizedTime(java.time.ZonedDateTime zdt)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.time.LocalDate
getLocalDate()
Return the first 8 character as local datejava.time.ZonedDateTime
getZonedDateTime()
Return the encoded GeneralizedTimejava.lang.String
toString()
Return Tag of TLV object as string-
Methods inherited from class de.cardcontact.tlv.PrimitiveTLV
dump, equals, getChildAt, getChildCount, getDate, getIndex, getLength, getParent, getValue, hashCode, isLeaf, toByteArray, valueToByteArray
-
Methods inherited from class de.cardcontact.tlv.TLV
dump, dumpSingleLine, factory, factory, factory, getBytes, getLengthFieldAsByteArray, getLengthFieldSize, getLengthFieldSizeHelper, getName, getSize, getTag, lengthFromByteArray, lengthToByteArray, setName, setTag, useAlternateLengthEncoding
-
-
-
-
Constructor Detail
-
GeneralizedTime
public GeneralizedTime(java.time.ZonedDateTime zdt)
-
GeneralizedTime
public GeneralizedTime(ParseBuffer pb) throws TLVEncodingException
Create object from parsing buffer- Parameters:
pb
- the parsing buffer- Throws:
TLVEncodingException
-
GeneralizedTime
public GeneralizedTime(TLV tlv) throws TLVEncodingException
Copy constructor to convert PrimitiveTLV to typed object Make sure, that the parent is updated with the new reference- Parameters:
tlv
- the PrimitiveTLV object- Throws:
TLVEncodingException
-
-
Method Detail
-
getLocalDate
public java.time.LocalDate getLocalDate()
Return the first 8 character as local date- Returns:
- the first 8 character interpreted as basic ISO date (yyyymmdd)
-
getZonedDateTime
public java.time.ZonedDateTime getZonedDateTime()
Return the encoded GeneralizedTime- Returns:
- the encoded date and time
-
toString
public java.lang.String toString()
Description copied from class:PrimitiveTLV
Return Tag of TLV object as string- Overrides:
toString
in classPrimitiveTLV
- Returns:
- String containing name of TLV object
-
-