// Decompiled by DJ v3.12.12.96 Copyright 2011 Atanas Neshkov  Date: 12.08.2011 2:53:57
// Home Page: http://members.fortunecity.com/neshkov/dj.html  http://www.neshkov.com/dj.html - Check often for new version!
// Decompiler options: packimports(3) 

import java.io.*;

public final class aa
{

    public aa()
    {
    }

    public static String a(byte abyte0[])
    {
        String s;
        return s = a(abyte0, ((StringBuffer) (null))).toString();
    }

    private static StringBuffer a(byte abyte0[], StringBuffer stringbuffer)
    {
        try
        {
            if(stringbuffer == null)
                stringbuffer = new StringBuffer();
            ByteArrayInputStream bytearrayinputstream = new ByteArrayInputStream(abyte0);
            DataInputStream datainputstream = new DataInputStream(bytearrayinputstream);
            boolean flag = true;
            do
            {
                if(!flag)
                    break;
                int i = 0;
                int j = 0;
                int k = 0;
                try
                {
                    i = a(datainputstream);
                    j = a(datainputstream);
                    k = a(datainputstream);
                }
                catch(IOException _ex)
                {
                    flag = false;
                }
                int l;
                int i1 = (l = i << 16 | j << 8 | k) >> 18;
                int j1 = l >> 12 & 0x3f;
                int k1 = l >> 6 & 0x3f;
                int l1 = l & 0x3f;
                stringbuffer.append(a[i1]);
                stringbuffer.append(a[j1]);
                stringbuffer.append(a[k1]);
                stringbuffer.append(a[l1]);
                if(!flag)
                    stringbuffer.append("=");
            } while(true);
        }
        catch(StringIndexOutOfBoundsException _ex) { }
        return stringbuffer;
    }

    private static int a(DataInputStream datainputstream)
        throws IOException
    {
        int i;
        if((i = datainputstream.readByte()) < 0)
            i = 256 + i;
        return i;
    }

    private static int a(char c)
    {
        int i = 0;
        if(c >= 'A' && c <= 'Z')
            i = c - 65;
        else
        if(c >= 'a' && c <= 'z')
            i = (c - 97) + 26;
        else
        if(c >= '0' && c <= '9')
            i = (c - 48) + 26 + 26;
        else
            switch(c)
            {
            case 43: // '+'
                i = 62;
                break;

            case 47: // '/'
                i = 63;
                break;

            case 61: // '='
                i = 0;
                break;

            default:
                throw new RuntimeException("unexpected code: " + c);
            }
        return i;
    }

    public static byte[] a(String s)
    {
        ByteArrayOutputStream bytearrayoutputstream = new ByteArrayOutputStream();
        try
        {
            a(s, ((OutputStream) (bytearrayoutputstream)));
        }
        catch(IOException _ex)
        {
            throw new RuntimeException();
        }
        return bytearrayoutputstream.toByteArray();
    }

    private static void a(String s, OutputStream outputstream)
        throws IOException
    {
        DataOutputStream dataoutputstream = new DataOutputStream(outputstream);
        int i = 0;
        for(boolean flag = true; flag;)
        {
            int j = 0;
            int k = 0;
            int l = 0;
            int i1 = 0;
            try
            {
                j = a(s.charAt(i++));
                k = a(s.charAt(i++));
                l = a(s.charAt(i++));
                i1 = a(s.charAt(i++));
            }
            catch(StringIndexOutOfBoundsException _ex)
            {
                flag = false;
            }
            int j1 = j << 2 | k >> 4;
            int k1 = k << 4 & 0xf0 | l >> 2;
            int l1 = l << 6 & 0xc0 | i1;
            dataoutputstream.writeByte(j1);
            dataoutputstream.writeByte(k1);
            dataoutputstream.writeByte(l1);
        }

    }

    public static final char a[] = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".toCharArray();

}