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()BuildsTimestampTokenIdentifierfor the providedeu.europa.esig.dss.spi.x509.tsp.TimestampTokenprotected byte[]Builds unique binary data describing the time-stamp tokenprotected ObjectReturns a position of a time-stamp token within a document among other time-stampsprotected StringReturns 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 voidWrites DER-encoded binaries of the current time-stamp token to the givenByteArrayOutputStreamprotected voidWrites 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
BuildsTimestampTokenIdentifierfor the providedeu.europa.esig.dss.spi.x509.tsp.TimestampToken- Specified by:
buildin 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-ByteArrayOutputStreamto write time-stamp binaries to- Throws:
IOException- if an exception occurs
-
writeTimestampPosition
Writes the current time-stamp position within a document- Parameters:
baos-ByteArrayOutputStreamto 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
-