public DSSDocument generateXAdESContentTimestampAsDSSDocument(final DSSDocument toSignDocument,final XAdESSignatureParameters externalParameters,final TimestampType timestampType){
  final TimestampToken timestampToken=generateXAdESContentTimestampAsTimestampToken(toSignDocument,externalParameters,timestampType);
  return new InMemoryDocument(timestampToken.getEncoded());
}

public DSSDocument generateXAdESContentTimestampAsDSSDocument ( final DSSDocument toSignDocument , final XAdESSignatureParameters externalParameters , final TimestampType timestampType ) { final TimestampToken timestampToken = generateXAdESContentTimestampAsTimestampToken ( toSignDocument , externalParameters , timestampType ) ; return new InMemoryDocument ( timestampToken . getEncoded ( ) ) ; }
method that generates a xades contenttimestamp ( either an all data objects timestamp or an individual data objects timestamp ) and returns it as a dssdocument
