Record Class ReceiptBundle
java.lang.Object
java.lang.Record
br.ufsc.labsec.signature.conformanceVerifier.receipt.ReceiptBundle
public record ReceiptBundle(SignatureContainer<CadesSignature> receipt, SignatureContainer<CadesSignature> request)
extends Record
Esta classe representa um pacote de recibo que contêm
o recibo em si e a sua requisição, ambos assinados.
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionReceiptBundle(SignatureContainer<CadesSignature> receipt, SignatureContainer<CadesSignature> request) Creates an instance of aReceiptBundlerecord class. -
Method Summary
Modifier and TypeMethodDescriptionstatic voidaddZipEntry(ZipOutputStream zos, String name, byte[] content) Adiciona um arquivo a uma stream zipbyte[]compress()Comprime o recibo e a requisição em um arquivo zipfinal booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.receipt()Returns the value of thereceiptrecord component.request()Returns the value of therequestrecord component.final StringtoString()Returns a string representation of this record class.
-
Field Details
-
RECEIPT_FILENAME_PREFIX
- See Also:
-
REQUEST_FILENAME_PREFIX
- See Also:
-
POSTFIX
- See Also:
-
RECEIPT_FILENAME_FORMAT
- See Also:
-
REQUEST_FILENAME_FORMAT
- See Also:
-
RECEIPT_DECODING_ERROR
- See Also:
-
REQUEST_DECODING_ERROR
- See Also:
-
-
Constructor Details
-
ReceiptBundle
public ReceiptBundle(SignatureContainer<CadesSignature> receipt, SignatureContainer<CadesSignature> request) Creates an instance of aReceiptBundlerecord class.- Parameters:
receipt- the value for thereceiptrecord componentrequest- the value for therequestrecord component
-
-
Method Details
-
compress
public byte[] compress()Comprime o recibo e a requisição em um arquivo zip- Returns:
- Os bytes do zip com o recibo e a requisição
-
addZipEntry
Adiciona um arquivo a uma stream zip- Parameters:
zos- A stream do zipname- O nome do arquivocontent- O conteúdo do arquivo- Throws:
IOException
-
getReceipt
-
getRequest
-
toString
-
hashCode
-
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared withObjects::equals(Object,Object). -
receipt
Returns the value of thereceiptrecord component.- Returns:
- the value of the
receiptrecord component
-
request
Returns the value of therequestrecord component.- Returns:
- the value of the
requestrecord component
-