AbstractRecordSplitter.java
1.08 KB
/*
* Decompiled with CFR 0_118.
*
* Could not load the following classes:
* com.adobe.aemds.guide.batch.api.RecordSplitter
*/
package com.adobe.aemds.guide.batch.impl;
import com.adobe.aemds.guide.batch.api.RecordSplitter;
import java.io.InputStream;
import javax.xml.parsers.SAXParser;
import javax.xml.parsers.SAXParserFactory;
import org.xml.sax.ContentHandler;
import org.xml.sax.InputSource;
import org.xml.sax.XMLReader;
import org.xml.sax.ext.DefaultHandler2;
public abstract class AbstractRecordSplitter
implements RecordSplitter {
public void parse(InputStream input, DefaultHandler2 handler) throws Exception {
SAXParserFactory saxParserFactory = SAXParserFactory.newInstance();
SAXParser saxParser = saxParserFactory.newSAXParser();
saxParser.setProperty("http://xml.org/sax/properties/lexical-handler", handler);
XMLReader xmlReader = saxParser.getXMLReader();
xmlReader.setProperty("http://xml.org/sax/properties/lexical-handler", handler);
xmlReader.setContentHandler(handler);
xmlReader.parse(new InputSource(input));
}
}