import javax.microedition.lcdui.*; import java.io.*; public class Encode { protected String s; private int n; public Encode() { s=""; } public void encode(String path) { InputStream is=getClass().getResourceAsStream(path); DataInputStream dis=new DataInputStream(is); n=0; StringBuffer sb=new StringBuffer(); try { while((n=dis.read())!=-1) { sb.append((char)((n>=0xc0&&n<=0xFF)?(n+0x350):n)); } dis.close(); } catch(IOException ioe) {} s=sb.toString(); } }