@@ -0,0 +1,626 @@
+package leetcode;%0A%0A/**%0A * Created by Joshua on 6/4/17.%0A */%0Apublic class EncodeDecode %7B%0A    private static String base64 = %22ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890!@#$%25%5E&*()%5B%5D%22; //42 - 64 = 12%0A%0A    public String encode64(String s) %7B%0A        StringBuffer buffer = new StringBuffer();%0A%0A        if (s.length()%253 != 0) %7B%0A            for (int i=(s.length()%253); i%3C 3; i++) %7B%0A                s+=%22 %22;%0A            %7D%0A        %7D%0A%0A        char%5B%5D c = s.toCharArray();%0A        for (int i=0; i%3Cc.length; i+=3) %7B%0A            int v = c%5Bi%5D + c%5Bi+1%5D + c%5Bi+2%5D;%0A%0A        %7D%0A    %7D%0A%0A    public String decode(String s) %7B%0A%0A    %7D%0A%7D%0A

encode decode