Package eu.europa.esig.dss.jades
Class HTTPHeader
java.lang.Object
eu.europa.esig.dss.jades.HTTPHeader
- All Implemented Interfaces:
DSSDocument,Serializable
- Direct Known Subclasses:
HTTPHeaderDigest
The class represents an HTTP Header to be signed
See ETSI TS 119 182-1 "5.2.8.2 Mechanism HttpHeaders"
The class shall be used only for JAdES detached
SigDMechanism.HTTP_HEADERS mechanism- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetDigest(DigestAlgorithm digestAlgorithm) This method returns the encoded digest value of the currentDSSDocumentusing the base64 algorithm.Returns the mime-type of theDSSDocument.getName()Returns a String name (key) of the HTTP HeadergetValue()Returns a String value of the HTTP HeaderOpens aInputStreamon theDSSDocumentcontents.voidSave the content of the DSSDocument to the file.voidsetMimeType(MimeType mimeType) This method sets the mime-type of theDSSDocument.voidThis method sets the name of theDSSDocument.voidSets a String value of HTTP HeadervoidwriteTo(OutputStream stream) Writes the content of the document to the provided OutputStream
-
Constructor Details
-
Method Details
-
getName
Returns a String name (key) of the HTTP Header- Specified by:
getNamein interfaceDSSDocument- Returns:
Stringrepresenting the name of the currentDSSDocument
-
getValue
Returns a String value of the HTTP Header- Returns:
Stringvalue
-
setValue
Sets a String value of HTTP Header- Parameters:
value-Stringvalue
-
openStream
Description copied from interface:DSSDocumentOpens aInputStreamon theDSSDocumentcontents. The type of theInputStreamdepends on the type of theDSSDocument.- Specified by:
openStreamin interfaceDSSDocument- Returns:
- an
InputStream
-
writeTo
Description copied from interface:DSSDocumentWrites the content of the document to the provided OutputStream- Specified by:
writeToin interfaceDSSDocument- Parameters:
stream- the output stream where to write- Throws:
IOException- if any IO error happens
-
setName
Description copied from interface:DSSDocumentThis method sets the name of theDSSDocument.- Specified by:
setNamein interfaceDSSDocument- Parameters:
name- the document name
-
getMimeType
Description copied from interface:DSSDocumentReturns the mime-type of theDSSDocument.- Specified by:
getMimeTypein interfaceDSSDocument- Returns:
MimeType
-
setMimeType
Description copied from interface:DSSDocumentThis method sets the mime-type of theDSSDocument.- Specified by:
setMimeTypein interfaceDSSDocument- Parameters:
mimeType-MimeType
-
save
Description copied from interface:DSSDocumentSave the content of the DSSDocument to the file.- Specified by:
savein interfaceDSSDocument- Parameters:
filePath- the path to the file to be created- Throws:
IOException- if any IO error happens
-
getDigest
Description copied from interface:DSSDocumentThis method returns the encoded digest value of the currentDSSDocumentusing the base64 algorithm.- Specified by:
getDigestin interfaceDSSDocument- Parameters:
digestAlgorithm-DigestAlgorithm- Returns:
- base64 encoded
String
-