新增注释

master
星期八 4 years ago
parent 9ae4587dc1
commit 29e3ebac73
  1. 5
      src/main/java/com/lq/wechat/util/IoUtil.java
  2. 8
      src/main/java/com/lq/wechat/util/MessageUtil.java

@ -11,6 +11,11 @@ import java.io.InputStreamReader;
*/
public class IoUtil {
/**
* 流转字符串
* @param inputStream
* @return
*/
public static String convertStreamToString(InputStream inputStream){
BufferedReader reader=new BufferedReader(new InputStreamReader(inputStream));
StringBuilder sb=new StringBuilder();

@ -20,8 +20,10 @@ import java.util.Map;
* @author qi
*/
public class MessageUtil {
/**
* 默认字符编辑
*/
public static final String DEFAULT_ENCODING="utf8";
/**
* xml map对象
@ -50,7 +52,7 @@ public class MessageUtil {
* @return
*/
public static String MessageToXml(Object obj){
XStream xstream = new XStream(new DomDriver("utf8"));
XStream xstream = new XStream(new DomDriver(DEFAULT_ENCODING));
// 识别obj类中的注解
xstream.processAnnotations(obj.getClass());
/*

Loading…
Cancel
Save