static Base64Variants() { System.Text.StringBuilder sb = new System.Text.StringBuilder(STD_BASE64_ALPHABET); // Replace plus with hyphen, slash with underscore (and no padding) Sharpen.Runtime.setCharAt(sb, sb.indexOf("+"), '-'); Sharpen.Runtime.setCharAt(sb, sb.indexOf("/"), '_'); /* And finally, let's not split lines either, wouldn't work too * well with URLs */ MODIFIED_FOR_URL = new com.fasterxml.jackson.core.Base64Variant("MODIFIED-FOR-URL" , sb.ToString(), false, com.fasterxml.jackson.core.Base64Variant.PADDING_CHAR_NONE , int.MaxValue); }