public class XMLSignatureInput extends Object
Constructor | Description |
---|---|
XMLSignatureInput(byte[] inputOctets) |
Construct a XMLSignatureInput from an octet array.
|
XMLSignatureInput(InputStream inputOctetStream) |
Constructs a
XMLSignatureInput from an octet stream. |
XMLSignatureInput(String preCalculatedDigest) |
Construct a
XMLSignatureInput from a known digest value in Base64. |
XMLSignatureInput(Set<Node> inputNodeSet) |
Constructor XMLSignatureInput
|
XMLSignatureInput(Node rootNode) |
Construct a XMLSignatureInput from a subtree rooted by rootNode.
|
Modifier and Type | Method | Description |
---|---|---|
void |
addNodeFilter(NodeFilter filter) |
|
byte[] |
getBytes() |
Returns the byte array from input which was specified as the parameter of
XMLSignatureInput constructor |
Node |
getExcludeNode() |
Gets the exclude node of this XMLSignatureInput
|
String |
getHTMLRepresentation() |
Method getHTMLRepresentation
|
String |
getHTMLRepresentation(Set<String> inclusiveNamespaces) |
Method getHTMLRepresentation
|
Set<Node> |
getInputNodeSet() |
Get the Input NodeSet.
|
String |
getMIMEType() |
Returns mimeType
|
List<NodeFilter> |
getNodeFilters() |
|
Set<Node> |
getNodeSet() |
Returns the node set from input which was specified as the parameter of
XMLSignatureInput constructor |
Set<Node> |
getNodeSet(boolean circumvent) |
Returns the node set from input which was specified as the parameter of
XMLSignatureInput constructor |
InputStream |
getOctetStream() |
Returns the Octet stream(byte Stream) from input which was specified as
the parameter of
XMLSignatureInput constructor |
InputStream |
getOctetStreamReal() |
|
String |
getPreCalculatedDigest() |
|
String |
getSourceURI() |
Return SourceURI
|
Node |
getSubNode() |
Gets the node of this XMLSignatureInput
|
boolean |
isByteArray() |
Determines if the object has been set up with a ByteArray
|
boolean |
isElement() |
Determines if the object has been set up with an Element
|
boolean |
isExcludeComments() |
|
boolean |
isInitialized() |
Is the object correctly set up?
|
boolean |
isNeedsToBeExpanded() |
Check if the structure needs to be expanded.
|
boolean |
isNodeSet() |
Determines if the object has been set up with a Node set
|
boolean |
isOctetStream() |
Determines if the object has been set up with an octet stream
|
boolean |
isOutputStreamSet() |
Determines if
setOutputStream(java.io.OutputStream) has been called with a
non-null OutputStream. |
boolean |
isPreCalculatedDigest() |
Determines if the object has been set up with a pre-calculated digest.
|
boolean |
isSecureValidation() |
|
void |
setExcludeComments(boolean excludeComments) |
|
void |
setExcludeNode(Node excludeNode) |
Sets the exclude node of this XMLSignatureInput
|
void |
setMIMEType(String mimeType) |
Sets mimeType
|
void |
setNeedsToBeExpanded(boolean needsToBeExpanded) |
Set if the structure needs to be expanded.
|
void |
setNodeSet(boolean b) |
|
void |
setOutputStream(OutputStream os) |
|
void |
setSecureValidation(boolean secureValidation) |
|
void |
setSourceURI(String sourceURI) |
Sets SourceURI
|
String |
toString() |
Method toString
|
void |
updateOutputStream(OutputStream diOs) |
|
void |
updateOutputStream(OutputStream diOs,
boolean c14n11) |
public XMLSignatureInput(byte[] inputOctets)
This is a comfort method, which internally converts the byte[] array into an InputStream
NOTE: no defensive copy
inputOctets
- an octet array which including XML document or nodepublic XMLSignatureInput(InputStream inputOctetStream)
XMLSignatureInput
from an octet stream. The
stream is directly read.inputOctetStream
- public XMLSignatureInput(Node rootNode)
rootNode
- public XMLSignatureInput(Set<Node> inputNodeSet)
inputNodeSet
- public XMLSignatureInput(String preCalculatedDigest)
XMLSignatureInput
from a known digest value in Base64.
This makes it possible to compare the element digest with the provided digest value.preCalculatedDigest
- digest value in base64.public boolean isNeedsToBeExpanded()
public void setNeedsToBeExpanded(boolean needsToBeExpanded)
needsToBeExpanded
- true if so.public Set<Node> getNodeSet() throws CanonicalizationException, ParserConfigurationException, IOException, SAXException
XMLSignatureInput
constructorSAXException
IOException
ParserConfigurationException
CanonicalizationException
public Set<Node> getInputNodeSet()
public Set<Node> getNodeSet(boolean circumvent) throws ParserConfigurationException, IOException, SAXException, CanonicalizationException
XMLSignatureInput
constructorcircumvent
- SAXException
IOException
ParserConfigurationException
CanonicalizationException
public InputStream getOctetStream() throws IOException
XMLSignatureInput
constructorXMLSignatureInput
constructorIOException
public InputStream getOctetStreamReal()
public byte[] getBytes() throws IOException, CanonicalizationException
XMLSignatureInput
constructorXMLSignatureInput
constructorCanonicalizationException
IOException
public boolean isNodeSet()
public boolean isElement()
public boolean isOctetStream()
public boolean isOutputStreamSet()
setOutputStream(java.io.OutputStream)
has been called with a
non-null OutputStream.setOutputStream(java.io.OutputStream)
has been called with a
non-null OutputStreampublic boolean isByteArray()
public boolean isPreCalculatedDigest()
public boolean isInitialized()
public String getMIMEType()
public void setMIMEType(String mimeType)
mimeType
- public String getSourceURI()
public void setSourceURI(String sourceURI)
sourceURI
- public String getHTMLRepresentation() throws XMLSignatureException
XMLSignatureException
public String getHTMLRepresentation(Set<String> inclusiveNamespaces) throws XMLSignatureException
inclusiveNamespaces
- XMLSignatureException
public Node getExcludeNode()
public void setExcludeNode(Node excludeNode)
excludeNode
- The excludeNode to set.public Node getSubNode()
public boolean isExcludeComments()
public void setExcludeComments(boolean excludeComments)
excludeComments
- The excludeComments to set.public void updateOutputStream(OutputStream diOs) throws CanonicalizationException, IOException
diOs
- IOException
CanonicalizationException
public void updateOutputStream(OutputStream diOs, boolean c14n11) throws CanonicalizationException, IOException
CanonicalizationException
IOException
public void setOutputStream(OutputStream os)
os
- public void addNodeFilter(NodeFilter filter)
filter
- public List<NodeFilter> getNodeFilters()
public void setNodeSet(boolean b)
b
- public boolean isSecureValidation()
public void setSecureValidation(boolean secureValidation)
public String getPreCalculatedDigest()
Copyright © 2000–2018 The Apache Software Foundation. All rights reserved.