out.write((byte)(((length + 1) & 0x3F) + ' '));
out.write((byte)((length & 0x3F) + ' '));
    private int encodeLine(byte[] data, int offset, int length, OutputStream out) throws IOException {        // write out the length of the data in this line, including the length byte.  This        // is uuencoded by basing it off of a ' ' character.        out.write((byte)(((length + 1) & 0x3F) + ' '));        byte a;        byte b;        byte c;        // count the bytes written...we add 2, one for the length and 1 for the linend terminator.        int bytesWritten = 2;        for (int i = 0; i < length;) {            // set the padding defauls            b = 1;            c = 1;            // get the next 3 bytes (if we have them)            a = data[offset + i++];            if (i < length) {                b = data[offset + i++];                if (i < length) {                    c = data[offset + i++];                }            }            byte d1 = (byte)(((a >>> 2) & 0x3F) + ' ');            byte d2 = (byte)(((( a << 4) & 0x30) | ((b >>> 4) & 0x0F)) + ' ');            byte d3 = (byte)((((b << 2) & 0x3C) | ((c >>> 6) & 0x3)) + ' ');            byte d4 = (byte)((c & 0x3F) + ' ');            out.write(d1);            out.write(d2);            out.write(d3);            out.write(d4);            bytesWritten += 4;        }        // terminate with a linefeed alone        out.write('\n');        return bytesWritten;    }