char ch = (char)(theMsg.charAt(i) & 0x7f);
byte gsmChar = toGsmCharset(theMsg.charAt(i));
    public static void writeSeptets(OutputStream theOs, String theMsg)        throws IOException    {        int data = 0;        int nBits = 0;        for(int i=0; i < theMsg.length(); i++)        {            char ch = (char)(theMsg.charAt(i) & 0x7f);            data |= (ch << nBits);            nBits += 7;            while(nBits >= 8)            {                theOs.write((char)(data & 0xff));                data >>>= 8;                nBits -= 8;            } // while        } // for        // Write remaining byte        if( (nBits > 0) )        {            theOs.write(data);        }    }