{
                is = new QInputStream(bis);
            }
            else
            {
                throw new UnsupportedEncodingException("Unknown encoding: " +
                                                    encoding);
            }
            len = bis.available();
            bytes = new byte[len];
            len = is.read(bytes, 0, len);
            String ret = new String(bytes, 0, len, charset);
            if (text.length() > end + 2)
            {
                String extra = text.substring(end + 2);
                ret = ret + extra;
            }
            return ret;
        }
        catch (IOException e)
        {
            throw new Exception();
        }
        catch (IllegalArgumentException e)
        {
            throw new UnsupportedEncodingException();
        }
    }