APIdia Launch Partner
Top Description Fields Constructors Methods
com.sun.org.apache.xml.internal.security.signature

public Class XMLSignatureInput

extends Object
Class Inheritance
Imports
java.io.ByteArrayInputStream, .ByteArrayOutputStream, .IOException, .InputStream, .OutputStream, java.util.ArrayList, .LinkedHashSet, .List, .Set, com.sun.org.apache.xml.internal.security.c14n.CanonicalizationException, com.sun.org.apache.xml.internal.security.c14n.implementations.Canonicalizer11_OmitComments, .Canonicalizer20010315OmitComments, .CanonicalizerBase, com.sun.org.apache.xml.internal.security.parser.XMLParserException, com.sun.org.apache.xml.internal.security.utils.JavaUtils, .XMLUtils, org.w3c.dom.Document, .Node

Class XMLSignatureInput $todo$ check whether an XMLSignatureInput can be _both_, octet stream _and_ node set?

Field Summary

Modifier and TypeField and Description
private byte[]
bytes

A cached bytes

private boolean
private Node
excludeNode

Exclude Node *for enveloped transformations*

private Set<Node>
inputNodeSet

The original NodeSet for this XMLSignatureInput

private InputStream
inputOctetStreamProxy

Some InputStreams do not support the java.io.InputStream#reset method, so we read it in completely and work on our Proxy.

private boolean
private String
mimeType

Some Transforms may require explicit MIME type, charset (IANA registered "character set"), or other such information concerning the data they are receiving from an earlier Transform or the source data, although no Transform algorithm specified in this document needs such explicit information.

private boolean
private List<NodeFilter>
nodeFilters

Node Filter list.

private OutputStream
private String
preCalculatedDigest

Pre-calculated digest value of the object in base64.

private boolean
private String
sourceURI

Field sourceURI

private Node
subNode

The original Element

Constructor Summary

AccessConstructor and Description
public
XMLSignatureInput(byte[]
an octet array which including XML document or node
inputOctets
)

Construct a XMLSignatureInput from an octet array.

public
XMLSignatureInput(InputStream inputOctetStream)

Constructs a XMLSignatureInput from an octet stream.

public
XMLSignatureInput(Node rootNode)

Construct a XMLSignatureInput from a subtree rooted by rootNode.

public
XMLSignatureInput(Set<Node> inputNodeSet)

Constructor XMLSignatureInput

public
XMLSignatureInput(String
digest value in base64.
preCalculatedDigest
)

Construct a XMLSignatureInput from a known digest value in Base64.

Method Summary

Modifier and TypeMethod and Description
public void
private void
public byte[]

Returns:

the byte[] from input which was specified as the parameter of XMLSignatureInput constructor
getBytes
()

Returns the byte array from input which was specified as the parameter of XMLSignatureInput constructor

private byte[]
public Node

Returns:

Returns the excludeNode.
getExcludeNode
()

Gets the exclude node of this XMLSignatureInput

public String

Returns:

The HTML representation for this XMLSignature
getHTMLRepresentation
()

Method getHTMLRepresentation

public String

Returns:

The HTML representation for this XMLSignature
getHTMLRepresentation
(Set<String> inclusiveNamespaces)

Method getHTMLRepresentation

public Set<Node>

Returns:

the Input NodeSet.
getInputNodeSet
()

Get the Input NodeSet.

public String

Returns:

mimeType
getMIMEType
()

Returns mimeType

public List<NodeFilter>
getNodeFilters()

Returns: the node filters

public Set<Node>

Returns:

the node set
getNodeSet
()

Returns the node set from input which was specified as the parameter of XMLSignatureInput constructor

public Set<Node>

Returns:

the node set
getNodeSet
(boolean circumvent)

Returns the node set from input which was specified as the parameter of XMLSignatureInput constructor

public InputStream

Returns:

the Octet stream(byte Stream) from input which was specified as the parameter of XMLSignatureInput constructor
getOctetStream
()

Returns the Octet stream(byte Stream) from input which was specified as the parameter of XMLSignatureInput constructor

public InputStream
getOctetStreamReal()

Returns: real octet stream

public String
public String

Returns:

SourceURI
getSourceURI
()

Return SourceURI

public Node

Returns:

The excludeNode set.
getSubNode
()

Gets the node of this XMLSignatureInput

public boolean

Returns:

true if the object has been set up with an octet stream
isByteArray
()

Determines if the object has been set up with a ByteArray

public boolean

Returns:

true if the object has been set up with an Element
isElement
()

Determines if the object has been set up with an Element

public boolean
isExcludeComments()

Returns: Returns the excludeComments.

public boolean

Returns:

true if the object has been set up correctly
isInitialized
()

Is the object correctly set up?

public boolean

Returns:

true if so.
isNeedsToBeExpanded
()

Check if the structure needs to be expanded.

public boolean

Returns:

true if the object has been set up with a Node set
isNodeSet
()

Determines if the object has been set up with a Node set

public boolean

Returns:

true if the object has been set up with an octet stream
isOctetStream
()

Determines if the object has been set up with an octet stream

public boolean

Returns:

true if setOutputStream has been called with a non-null OutputStream
isOutputStreamSet
()

Determines if setOutputStream has been called with a non-null OutputStream.

public boolean

Returns:

true if the object has been set up with a pre-calculated digest.
isPreCalculatedDigest
()

Determines if the object has been set up with a pre-calculated digest.

public boolean
public void
setExcludeComments(boolean
The excludeComments to set.
excludeComments
)

public void
setExcludeNode(Node
The excludeNode to set.
excludeNode
)

Sets the exclude node of this XMLSignatureInput

public void
setMIMEType(String mimeType)

Sets mimeType

public void
setNeedsToBeExpanded(boolean
true if so.
needsToBeExpanded
)

Set if the structure needs to be expanded.

public void
setNodeSet(boolean b)

public void
public void
setSecureValidation(boolean secureValidation)

public void
setSourceURI(String sourceURI)

Sets SourceURI

public String
toString()

Overrides java.lang.Object.toString.

Method toString Returns a string representation of the object.

public void
public void
updateOutputStream(OutputStream diOs, boolean c14n11)

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAllwaitwaitwait

Field Detail

bytesback to summary
private byte[] bytes

A cached bytes

excludeCommentsback to summary
private boolean excludeComments
excludeNodeback to summary
private Node excludeNode

Exclude Node *for enveloped transformations*

inputNodeSetback to summary
private Set<Node> inputNodeSet

The original NodeSet for this XMLSignatureInput

inputOctetStreamProxyback to summary
private InputStream inputOctetStreamProxy

Some InputStreams do not support the java.io.InputStream#reset method, so we read it in completely and work on our Proxy.

isNodeSetback to summary
private boolean isNodeSet
mimeTypeback to summary
private String mimeType

Some Transforms may require explicit MIME type, charset (IANA registered "character set"), or other such information concerning the data they are receiving from an earlier Transform or the source data, although no Transform algorithm specified in this document needs such explicit information. Such data characteristics are provided as parameters to the Transform algorithm and should be described in the specification for the algorithm.

needsToBeExpandedback to summary
private boolean needsToBeExpanded
nodeFiltersback to summary
private List<NodeFilter> nodeFilters

Node Filter list.

outputStreamback to summary
private OutputStream outputStream
preCalculatedDigestback to summary
private String preCalculatedDigest

Pre-calculated digest value of the object in base64.

secureValidationback to summary
private boolean secureValidation
sourceURIback to summary
private String sourceURI

Field sourceURI

subNodeback to summary
private Node subNode

The original Element

Constructor Detail

XMLSignatureInputback to summary
public XMLSignatureInput(byte[] inputOctets)

Construct a XMLSignatureInput from an octet array.

This is a comfort method, which internally converts the byte[] array into an InputStream

Note

no defensive copy

Parameters
inputOctets:byte[]

an octet array which including XML document or node

XMLSignatureInputback to summary
public XMLSignatureInput(InputStream inputOctetStream)

Constructs a XMLSignatureInput from an octet stream. The stream is directly read.

XMLSignatureInputback to summary
public XMLSignatureInput(Node rootNode)

Construct a XMLSignatureInput from a subtree rooted by rootNode. This method included the node and all its descendants in the output.

XMLSignatureInputback to summary
public XMLSignatureInput(Set<Node> inputNodeSet)

Constructor XMLSignatureInput

XMLSignatureInputback to summary
public XMLSignatureInput(String preCalculatedDigest)

Construct a XMLSignatureInput from a known digest value in Base64. This makes it possible to compare the element digest with the provided digest value.

Parameters
preCalculatedDigest:String

digest value in base64.

Method Detail

addNodeFilterback to summary
public void addNodeFilter(NodeFilter filter) throws XMLParserException, IOException
convertToNodesback to summary
private void convertToNodes() throws XMLParserException, IOException
getBytesback to summary
public byte[] getBytes() throws IOException, CanonicalizationException

Returns the byte array from input which was specified as the parameter of XMLSignatureInput constructor

Returns:byte[]

the byte[] from input which was specified as the parameter of XMLSignatureInput constructor

getBytesFromInputStreamback to summary
private byte[] getBytesFromInputStream() throws IOException
getExcludeNodeback to summary
public Node getExcludeNode()

Gets the exclude node of this XMLSignatureInput

Returns:Node

Returns the excludeNode.

getHTMLRepresentationback to summary
public String getHTMLRepresentation() throws XMLSignatureException

Method getHTMLRepresentation

Returns:String

The HTML representation for this XMLSignature

getHTMLRepresentationback to summary
public String getHTMLRepresentation(Set<String> inclusiveNamespaces) throws XMLSignatureException

Method getHTMLRepresentation

Returns:String

The HTML representation for this XMLSignature

getInputNodeSetback to summary
public Set<Node> getInputNodeSet()

Get the Input NodeSet.

Returns:Set<Node>

the Input NodeSet.

getMIMETypeback to summary
public String getMIMEType()

Returns mimeType

Returns:String

mimeType

getNodeFiltersback to summary
public List<NodeFilter> getNodeFilters()
Returns:List<NodeFilter>

the node filters

getNodeSetback to summary
public Set<Node> getNodeSet() throws XMLParserException, IOException

Returns the node set from input which was specified as the parameter of XMLSignatureInput constructor

Returns:Set<Node>

the node set

getNodeSetback to summary
public Set<Node> getNodeSet(boolean circumvent) throws XMLParserException, IOException

Returns the node set from input which was specified as the parameter of XMLSignatureInput constructor

Returns:Set<Node>

the node set

getOctetStreamback to summary
public InputStream getOctetStream() throws IOException

Returns the Octet stream(byte Stream) from input which was specified as the parameter of XMLSignatureInput constructor

Returns:InputStream

the Octet stream(byte Stream) from input which was specified as the parameter of XMLSignatureInput constructor

getOctetStreamRealback to summary
public InputStream getOctetStreamReal()
Returns:InputStream

real octet stream

getPreCalculatedDigestback to summary
public String getPreCalculatedDigest()
getSourceURIback to summary
public String getSourceURI()

Return SourceURI

Returns:String

SourceURI

getSubNodeback to summary
public Node getSubNode()

Gets the node of this XMLSignatureInput

Returns:Node

The excludeNode set.

isByteArrayback to summary
public boolean isByteArray()

Determines if the object has been set up with a ByteArray

Returns:boolean

true if the object has been set up with an octet stream

isElementback to summary
public boolean isElement()

Determines if the object has been set up with an Element

Returns:boolean

true if the object has been set up with an Element

isExcludeCommentsback to summary
public boolean isExcludeComments()
Returns:boolean

Returns the excludeComments.

isInitializedback to summary
public boolean isInitialized()

Is the object correctly set up?

Returns:boolean

true if the object has been set up correctly

isNeedsToBeExpandedback to summary
public boolean isNeedsToBeExpanded()

Check if the structure needs to be expanded.

Returns:boolean

true if so.

isNodeSetback to summary
public boolean isNodeSet()

Determines if the object has been set up with a Node set

Returns:boolean

true if the object has been set up with a Node set

isOctetStreamback to summary
public boolean isOctetStream()

Determines if the object has been set up with an octet stream

Returns:boolean

true if the object has been set up with an octet stream

isOutputStreamSetback to summary
public boolean isOutputStreamSet()

Determines if setOutputStream has been called with a non-null OutputStream.

Returns:boolean

true if setOutputStream has been called with a non-null OutputStream

isPreCalculatedDigestback to summary
public boolean isPreCalculatedDigest()

Determines if the object has been set up with a pre-calculated digest.

Returns:boolean

true if the object has been set up with a pre-calculated digest.

isSecureValidationback to summary
public boolean isSecureValidation()
setExcludeCommentsback to summary
public void setExcludeComments(boolean excludeComments)
Parameters
excludeComments:boolean

The excludeComments to set.

setExcludeNodeback to summary
public void setExcludeNode(Node excludeNode)

Sets the exclude node of this XMLSignatureInput

Parameters
excludeNode:Node

The excludeNode to set.

setMIMETypeback to summary
public void setMIMEType(String mimeType)

Sets mimeType

setNeedsToBeExpandedback to summary
public void setNeedsToBeExpanded(boolean needsToBeExpanded)

Set if the structure needs to be expanded.

Parameters
needsToBeExpanded:boolean

true if so.

setNodeSetback to summary
public void setNodeSet(boolean b)
setOutputStreamback to summary
public void setOutputStream(OutputStream os)
setSecureValidationback to summary
public void setSecureValidation(boolean secureValidation)
setSourceURIback to summary
public void setSourceURI(String sourceURI)

Sets SourceURI

toStringback to summary
public String toString()

Overrides java.lang.Object.toString.

Doc from java.lang.Object.toString.

Method toString Returns a string representation of the object. Satisfying this method's contract implies a non-null result must be returned.

Annotations
@Override
updateOutputStreamback to summary
public void updateOutputStream(OutputStream diOs) throws CanonicalizationException, IOException
updateOutputStreamback to summary
public void updateOutputStream(OutputStream diOs, boolean c14n11) throws CanonicalizationException, IOException