org.vivoweb.harvester.util.repo
Class XMLRecordOutputStream
java.lang.Object
   java.io.OutputStream
java.io.OutputStream
       org.vivoweb.harvester.util.repo.XMLRecordOutputStream
org.vivoweb.harvester.util.repo.XMLRecordOutputStream
- All Implemented Interfaces: 
- java.io.Closeable, java.io.Flushable, java.lang.Cloneable
- public class XMLRecordOutputStream 
- extends java.io.OutputStream- implements java.lang.Cloneable
An Output Stream that breaks XML blobs into individual Records and writes to a RecordHandler
- Author:
- Christopher Haines (hainesc@ctrip.ufl.edu)
| Constructor Summary | 
| XMLRecordOutputStream(java.lang.String[] tagsToSplitOn,
                      java.lang.String headerInfo,
                      java.lang.String footerInfo,
                      java.lang.String idLocationRegex,
                      RecordHandler recordHandler,
                      java.lang.Class<?> operator)Constructor
 | 
 
 
| Methods inherited from class java.io.OutputStream | 
| close, flush, write, write | 
 
| Methods inherited from class java.lang.Object | 
| equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait | 
 
XMLRecordOutputStream
public XMLRecordOutputStream(java.lang.String[] tagsToSplitOn,
                             java.lang.String headerInfo,
                             java.lang.String footerInfo,
                             java.lang.String idLocationRegex,
                             RecordHandler recordHandler,
                             java.lang.Class<?> operator)
- Constructor
 
- Parameters:
- tagsToSplitOn- defines the record tag types
- headerInfo- prepended to each record
- footerInfo- appended to each record
- idLocationRegex- regex to find the data to be used as ID
- recordHandler- RecordHandler to write records to
- operator- the class writing records
 
clone
public XMLRecordOutputStream clone()
- 
- Overrides:
- clonein class- java.lang.Object
 
- 
 
write
public void write(int arg0)
           throws java.io.IOException
- 
- Specified by:
- writein class- java.io.OutputStream
 
- 
- Throws:
- java.io.IOException
 
setRecordHandler
public XMLRecordOutputStream setRecordHandler(RecordHandler rh)
- Set the record handler
 
- 
 
- 
- Parameters:
- rh- new record handler
- Returns:
- self reference