com.googlecode.jpattern.orm.script
Class StreamParser

java.lang.Object
  extended by com.googlecode.jpattern.orm.script.StreamParser
All Implemented Interfaces:
IParser

public class StreamParser
extends Object
implements IParser

Author:
Francesco Cina 01/lug/2011 Parse a Stream identifying valid sql statement. For every statement found a call to the IParserCallback is performed.

Constructor Summary
StreamParser(InputStream inputStream, boolean closeInputStream)
           
StreamParser(InputStream inputStream, boolean closeInputStream, Charset charset)
           
 
Method Summary
 void parse(IParserCallback parserCallback)
          Parse the script using the default symbol ";" to identify the sql statements
 void parse(IParserCallback parserCallback, String spearatorSymbol)
          Parse the script using a custom symbol to identify the sql statements
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

StreamParser

public StreamParser(InputStream inputStream,
                    boolean closeInputStream)

StreamParser

public StreamParser(InputStream inputStream,
                    boolean closeInputStream,
                    Charset charset)
Method Detail

parse

public void parse(IParserCallback parserCallback)
           throws IOException
Description copied from interface: IParser
Parse the script using the default symbol ";" to identify the sql statements

Specified by:
parse in interface IParser
Throws:
IOException

parse

public void parse(IParserCallback parserCallback,
                  String spearatorSymbol)
           throws IOException
Description copied from interface: IParser
Parse the script using a custom symbol to identify the sql statements

Specified by:
parse in interface IParser
spearatorSymbol - a custom separator symbol
Throws:
IOException


Copyright © 2011. All Rights Reserved.