|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.codehaus.cargo.module.merge.DocumentStreamAdapter
public class 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(Object mergeItem)
Add an item to be merged. |
DescriptorIo |
getDescriptorIo()
|
protected org.jdom.Document |
getDocument(InputStream theInput)
Parse the input stream into a document. |
Object |
performMerge()
Perform the merge. |
void |
setDescriptorIo(DescriptorIo descriptorIo)
|
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(Object mergeItem) throws MergeException
addMergeItem
in interface MergeProcessor
mergeItem
- in the item to merge.
MergeException
- on exceptionsMergeProcessor.addMergeItem(java.lang.Object)
public Object performMerge() throws MergeException
performMerge
in interface MergeProcessor
MergeException
- if there is a problemMergeProcessor.performMerge()
protected org.jdom.Document getDocument(InputStream theInput) throws IOException, org.jdom.JDOMException
theInput
- in the InputStream to read
IOException
- on IO exception
org.jdom.JDOMException
- if there is an XML problempublic DescriptorIo getDescriptorIo()
public void setDescriptorIo(DescriptorIo descriptorIo)
descriptorIo
- the descriptorIo to set
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |