使用指南
M家杰 edited this page Apr 11, 2016
·
3 revisions
这个库只做编码和解码,所以使用的时候只需要关注两个类Encode
和Decode
。
顾名思义,一个编码一个解码。
以Base64为例:
编码
String str = Encode.Base64("string");
解码
String str = Decode.Base64("string");
很简单。
##自定义编解码
部分的编码算法支持自定义一些规则,例如Base64。
调用Custom为前缀的方法进行规则设置,最后不要忘记调用doit();
String string = Encode.Custom_Base64("string")
.setMaxCharLine(76)
.doit();