Package eu.europa.esig.dss.spi.x509.tsp
Class TimestampIdentifierBuilder
java.lang.Object
eu.europa.esig.dss.spi.x509.tsp.TimestampIdentifierBuilder
- All Implemented Interfaces:
IdentifierBuilder
,Serializable
- Direct Known Subclasses:
EvidenceRecordTimestampIdentifierBuilder
,PdfTimestampTokenIdentifierBuilder
,SignatureTimestampIdentifierBuilder
,VriDictionaryTimestampIdentifierBuilder
Builds an
eu.europa.esig.dss.spi.x509.tsp.TimestampTokenIdentifier
for the provided eu.europa.esig.dss.spi.x509.tsp.TimestampToken
.
This class provided a format independent implementation.
Please use inherited classed for format-specific implementations.- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final byte[]
Time-stamp token to build an identifier for -
Constructor Summary
ConstructorsConstructorDescriptionTimestampIdentifierBuilder
(byte[] timestampTokenBinaries) Default constructor to build an implementation independent identifier -
Method Summary
Modifier and TypeMethodDescriptionbuild()
BuildsTimestampTokenIdentifier
for the providedeu.europa.esig.dss.spi.x509.tsp.TimestampToken
protected byte[]
Builds unique binary data describing the time-stamp tokenprotected Object
Returns a position of a time-stamp token within a document among other time-stampsprotected String
Returns Id representing a current signature position in a file, considering its pre-siblings, master signatures when presentsetFilename
(String filename) Sets a time-stamp document filenameprotected void
Writes DER-encoded binaries of the current time-stamp token to the givenByteArrayOutputStream
protected void
Writes the current time-stamp position within a document
-
Field Details
-
timestampTokenBinaries
protected final byte[] timestampTokenBinariesTime-stamp token to build an identifier for
-
-
Constructor Details
-
TimestampIdentifierBuilder
public TimestampIdentifierBuilder(byte[] timestampTokenBinaries) Default constructor to build an implementation independent identifier- Parameters:
timestampTokenBinaries
- byte array representing a DER-encoded time-stamp binary octets
-
-
Method Details
-
setFilename
Sets a time-stamp document filename- Parameters:
filename
-String
- Returns:
- this
TimestampIdentifierBuilder
-
build
BuildsTimestampTokenIdentifier
for the providedeu.europa.esig.dss.spi.x509.tsp.TimestampToken
- Specified by:
build
in interfaceIdentifierBuilder
- Returns:
TimestampTokenIdentifier
-
buildBinaries
protected byte[] buildBinaries()Builds unique binary data describing the time-stamp token- Returns:
- a byte array
-
writeTimestampBinaries
Writes DER-encoded binaries of the current time-stamp token to the givenByteArrayOutputStream
- Parameters:
baos
-ByteArrayOutputStream
to write time-stamp binaries to- Throws:
IOException
- if an exception occurs
-
writeTimestampPosition
Writes the current time-stamp position within a document- Parameters:
baos
-ByteArrayOutputStream
to add data to- Throws:
IOException
- if an exception occurs
-
getUniquePositionId
-
getTimestampPosition
Returns a position of a time-stamp token within a document among other time-stamps- Returns:
- time-stamp position identifier
-