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
public class HTTPHeader extends Object implements DSSDocument
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:
- Serialized Form
-
Constructor Summary
Constructors Constructor Description HTTPHeader(String name, String value)The default constructor -
Method Summary
Modifier and Type Method Description StringgetAbsolutePath()Returns theStringrepresenting the absolute path to the encapsulated document.StringgetDigest(DigestAlgorithm digestAlgorithm)This method returns the encoded digest value of the currentDSSDocumentusing the base64 algorithm.MimeTypegetMimeType()Returns the mime-type of theDSSDocument.StringgetName()Returns a String name (key) of the HTTP HeaderStringgetValue()Returns a String value of the HTTP HeaderInputStreamopenStream()Opens aInputStreamon theDSSDocumentcontents.voidsave(String filePath)Save the content of the DSSDocument to the file.voidsetMimeType(MimeType mimeType)This method sets the mime-type of theDSSDocument.voidsetName(String name)This method sets the name of theDSSDocument.voidsetValue(String value)Sets 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
-
getAbsolutePath
Description copied from interface:DSSDocumentReturns theStringrepresenting the absolute path to the encapsulated document.- Specified by:
getAbsolutePathin interfaceDSSDocument- Returns:
Stringrepresenting the absolute path to the encapsulated document.
-
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
-