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