Module org.apache.santuario.xmlsec
Class XMLSignatureStreamInput
- java.lang.Object
-
- org.apache.xml.security.signature.XMLSignatureInput
-
- org.apache.xml.security.signature.XMLSignatureStreamInput
-
- All Implemented Interfaces:
AutoCloseable
- Direct Known Subclasses:
XMLSignatureFileInput
public class XMLSignatureStreamInput extends XMLSignatureInput implements AutoCloseable
The XMLSignature Input as an input stream containing a collection of nodes or a subnode excluding or not comments and excluding or not other nodes. The stream is closed after processing.NOTE: The stream may be closed in the process, but it is not guaranteed.
-
-
Constructor Summary
Constructors Constructor Description XMLSignatureStreamInput(InputStream inputStream)Construct a XMLSignatureInput from anInputStream.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()protected NodeconvertToNode()InputStreamgetUnprocessedInput()booleanhasUnprocessedInput()voidwrite(OutputStream output, boolean c14n11)Writes the data to the output stream.-
Methods inherited from class org.apache.xml.security.signature.XMLSignatureInput
addNodeFilter, canonicalize, getBytes, getExcludeNode, getInputNodeSet, getMIMEType, getNodeFilters, getNodeSet, getOutputStream, getPreCalculatedDigest, getSourceURI, getSubNode, isElement, isExcludeComments, isNeedsToBeExpanded, isNodeSet, isOutputStreamSet, isSecureValidation, setExcludeComments, setExcludeNode, setMIMEType, setNeedsToBeExpanded, setNodeSet, setOutputStream, setSecureValidation, setSourceURI, toString, write
-
-
-
-
Constructor Detail
-
XMLSignatureStreamInput
public XMLSignatureStreamInput(InputStream inputStream)
Construct a XMLSignatureInput from anInputStream.NOTE: The stream may be closed in the process, but it is not guaranteed.
- Parameters:
inputStream- includes XML document or node
-
-
Method Detail
-
hasUnprocessedInput
public boolean hasUnprocessedInput()
- Specified by:
hasUnprocessedInputin classXMLSignatureInput- Returns:
- true if this instance still can provide the unprocessed input
which was specified as the parameter of
XMLSignatureInput
-
getUnprocessedInput
public InputStream getUnprocessedInput()
- Specified by:
getUnprocessedInputin classXMLSignatureInput- Returns:
- the
InputStreamfrom input which was specified as the parameter ofXMLSignatureInputconstructor
-
write
public void write(OutputStream output, boolean c14n11) throws CanonicalizationException, IOException
Description copied from class:XMLSignatureInputWrites the data to the output stream.- Specified by:
writein classXMLSignatureInput- Throws:
CanonicalizationExceptionIOException- See Also:
- XmlDSig-Core Reference Generation
-
convertToNode
protected Node convertToNode() throws org.apache.xml.security.parser.XMLParserException, IOException
- Specified by:
convertToNodein classXMLSignatureInput- Returns:
- data given in constructor converted to a
Nodeor null if such conversion is not supported by thisXMLSignatureInput - Throws:
org.apache.xml.security.parser.XMLParserExceptionIOException
-
close
public void close() throws IOException- Specified by:
closein interfaceAutoCloseable- Throws:
IOException
-
-