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
-
Method Summary
Modifier and TypeMethodDescriptiongetDigest
(DigestAlgorithm digestAlgorithm) This method returns the encoded digest value of the currentDSSDocument
using 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 aInputStream
on theDSSDocument
contents.void
Save the content of the DSSDocument to the file.void
setMimeType
(MimeType mimeType) This method sets the mime-type of theDSSDocument
.void
This method sets the name of theDSSDocument
.void
Sets a String value of HTTP Headervoid
writeTo
(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:
getName
in interfaceDSSDocument
- Returns:
String
representing the name of the currentDSSDocument
-
getValue
Returns a String value of the HTTP Header- Returns:
String
value
-
setValue
Sets a String value of HTTP Header- Parameters:
value
-String
value
-
openStream
Description copied from interface:DSSDocument
Opens aInputStream
on theDSSDocument
contents. The type of theInputStream
depends on the type of theDSSDocument
.- Specified by:
openStream
in interfaceDSSDocument
- Returns:
- an
InputStream
-
writeTo
Description copied from interface:DSSDocument
Writes the content of the document to the provided OutputStream- Specified by:
writeTo
in interfaceDSSDocument
- Parameters:
stream
- the output stream where to write- Throws:
IOException
- if any IO error happens
-
setName
Description copied from interface:DSSDocument
This method sets the name of theDSSDocument
.- Specified by:
setName
in interfaceDSSDocument
- Parameters:
name
- the document name
-
getMimeType
Description copied from interface:DSSDocument
Returns the mime-type of theDSSDocument
.- Specified by:
getMimeType
in interfaceDSSDocument
- Returns:
MimeType
-
setMimeType
Description copied from interface:DSSDocument
This method sets the mime-type of theDSSDocument
.- Specified by:
setMimeType
in interfaceDSSDocument
- Parameters:
mimeType
-MimeType
-
save
Description copied from interface:DSSDocument
Save the content of the DSSDocument to the file.- Specified by:
save
in interfaceDSSDocument
- Parameters:
filePath
- the path to the file to be created- Throws:
IOException
- if any IO error happens
-
getDigest
Description copied from interface:DSSDocument
This method returns the encoded digest value of the currentDSSDocument
using the base64 algorithm.- Specified by:
getDigest
in interfaceDSSDocument
- Parameters:
digestAlgorithm
-DigestAlgorithm
- Returns:
- base64 encoded
String
-