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) Deprecated.byte[]
getDigestValue
(DigestAlgorithm digestAlgorithm) This method returns digest value of the current document's content using the provideddigestAlgorithm
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
-
HTTPHeader
-
-
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
-
setValue
-
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
Deprecated.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
-
getDigestValue
Description copied from interface:DSSDocument
This method returns digest value of the current document's content using the provideddigestAlgorithm
- Specified by:
getDigestValue
in interfaceDSSDocument
- Parameters:
digestAlgorithm
-DigestAlgorithm
to get digest for- Returns:
- byte array representing digest of the document
-