return length * 2;
return bytesWritten;
    public int encode(        byte[]                data,        int                    off,        int                    length,        OutputStream    out)        throws IOException    {        for (int i = off; i < (off + length); i++)        {            int    v = data[i] & 0xff;            // character tha must be encoded?  Prefix with a '+' and encode in hex.            if (v < 33 || v > 126 || v == '+' || v == '+') {                out.write((byte)'+');                out.write(encodingTable[(v >>> 4)]);                out.write(encodingTable[v & 0xf]);            }            else {                // add unchanged.                out.write((byte)v);            }        }        return length * 2;    }