How can I split multiple statement mysql queries to separated statements?

I am developing a java based mysql editor in which to execute user input queries I need to break mysql multiple query string into seprate statements using JAVA. How can I do this ?

For example -

String multiQueryString = "select * from table1 ;select * from table2;update table1 set age=25" ;

 // After splitting multiquery string say in  arr[]

arr[0]="select * from table1;"
arr[1]="select * from table2;"
arr[2]="update table1 set age=25;"

I found a parser named TSParser but it is in javascipt I don't know how to use this in my java program.

See TSParser here - TSParser