org.freehep.util.io
Class XMLSequence
java.lang.Object
  
java.io.InputStream
      
org.freehep.util.io.XMLSequence
- public class XMLSequence
- extends InputStream
  
The XMLSequence allows parsing by an XML Parser of concatenated XML segments. 
 Each segment needs to start with "
   XMLSequence sequence = new XMLSequence(new FileInputStream("file.xml"));
   
   SAXParserFactory factory = SAXParserFactory.newInstance();
   XMLReader xmlReader = factory.newSAXParser().getXMLReader();
   
   while (sequence.hasNext()) {
       InputStream input = sequence.next();
       InputSource source = new InputSource(input);
       xmlReader.parse(source);
       input.close();
   }
   sequence.close();
 
 IMPORTANT: inherits from InputStream rather than FilterInputStream
 so that the correct read(byte[], int, int) method is used.
- Version:
 
  - $Id: XMLSequence.java,v 1.4 2004/07/24 06:05:18 duns Exp $
 
- Author:
 
  - Mark Donszelmann
 
- Source Code:
 - XMLSequence.java
 
 
 
 
| Methods inherited from class java.lang.Object | 
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait | 
 
XMLSequence
public XMLSequence(InputStream input)
hasNext
public boolean hasNext()
 
next
public InputStream next()
                 throws IOException
- Throws:
 IOException
 
read
public int read()
         throws IOException
- Throws:
 IOException
 
mark
public void mark(int readLimit)
 
markSupported
public boolean markSupported()
 
reset
public void reset()
           throws IOException
- Throws:
 IOException
 
close
public void close()
           throws IOException
- Throws:
 IOException
 
Copyright © 2000-2004 FreeHEP, All Rights Reserved.