import java.util.*;
import java.io.*;

public class Splitter{

public Splitter(){
}

public static String[] split(String s,int[] delim){
byte[] b = s.getBytes();
ByteArrayInputStream bis = new ByteArrayInputStream(b);
DataInputStream dis = new DataInputStream(bis);
StringBuffer sb = new StringBuffer();
Vector ret = new Vector();
try{
	int ch=0;
	while((ch = dis.read())!=-1) {
		if(check(ch,delim)){
			sb.append((char) ((ch >= 0xc0 && ch <= 0xFF) ? (ch + 0x350) : ch));
		} else {
			ret.addElement(sb.toString());
			sb = new StringBuffer();
		}
	}
	ret.addElement(sb.toString());
} catch (Exception e){}
return getArrayFromVectorS(ret);
}

public static String[] split(String s,int delim){
int[] delimArr = new int[1];
delimArr[0] = delim;
return split(s,delimArr);
}

public static Object[] getArrayFromVector(Vector v){
Object[] ret = new Object[v.size()];
for(int i=0;i<v.size();i++){
	ret[i] = v.elementAt(i);
}
return ret;
}

public static String[] getArrayFromVectorS(Vector v){
String[] ret = new String[v.size()];
for(int i=0;i<v.size();i++){
	ret[i] = (String) v.elementAt(i);
}
return ret;
}

public static boolean check(int ch,int[] delim){
boolean ret=true;
for(int i=0;i<delim.length;i++){
	if(ch==delim[i]){
		ret = false;
	}
}
return ret;
}

}