|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.codehaus.cargo.module.AbstractDescriptorIo
org.codehaus.cargo.module.merge.DocumentStreamAdapter
Adapter class to convert streams into documents. This is needed because the DocumentMerger understands DOM Documents, but items in War files are accessed as streams - therefore use this wrapper to pass streams into the DocumentMerger (or subclass).
Constructor Summary | |
DocumentStreamAdapter(MergeProcessor next)
constructor. |
Method Summary | |
void |
addMergeItem(java.lang.Object mergeItem)
Add an item to be merged. |
protected org.w3c.dom.Document |
getDocument(java.io.InputStream theInput)
Parse the input stream into a document. |
java.lang.Object |
performMerge()
Perform the merge. |
Methods inherited from class org.codehaus.cargo.module.AbstractDescriptorIo |
createDocumentBuilder, writeAll, writeDescriptor, writeDescriptor, writeDescriptor, writeDescriptor |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public DocumentStreamAdapter(MergeProcessor next)
next
- the processor to adaptMethod Detail |
public void addMergeItem(java.lang.Object mergeItem) throws MergeException
addMergeItem
in interface MergeProcessor
mergeItem
- in the item to merge.
MergeException
- on exceptionsMergeProcessor.addMergeItem(java.lang.Object)
public java.lang.Object performMerge() throws MergeException
performMerge
in interface MergeProcessor
MergeException
- if there is a problemMergeProcessor.performMerge()
protected org.w3c.dom.Document getDocument(java.io.InputStream theInput) throws javax.xml.parsers.ParserConfigurationException, org.xml.sax.SAXException, java.io.IOException
theInput
- in the InputStream to read
javax.xml.parsers.ParserConfigurationException
- on parse exception
org.xml.sax.SAXException
- on sax exception
java.io.IOException
- on IO exception
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |