public static boolean isBase64Encode(String content){
if(content.length()%4!=0){
return false;
}
String pattern = "^[a-zA-Z0-9/+]*={0,2}$";
return Pattern.matches(pattern, content);
}
public static boolean isBase64Encode(String content){
if(content.length()%4!=0){
return false;
}
String pattern = "^[a-zA-Z0-9/+]*={0,2}$";
return Pattern.matches(pattern, content);
}
本文标题:java中检查字符串是否经过base64编码
本文链接:https://www.haomeiwen.com/subject/vkfpdftx.html
网友评论