diff options
Diffstat (limited to 'juick-www/src/main/java/com/juick/www')
-rw-r--r-- | juick-www/src/main/java/com/juick/www/Utils.java | 31 |
1 files changed, 0 insertions, 31 deletions
diff --git a/juick-www/src/main/java/com/juick/www/Utils.java b/juick-www/src/main/java/com/juick/www/Utils.java index 8189bd82..ccb7cdd2 100644 --- a/juick-www/src/main/java/com/juick/www/Utils.java +++ b/juick-www/src/main/java/com/juick/www/Utils.java @@ -17,7 +17,6 @@ */ package com.juick.www; -import com.juick.*; import com.juick.User; import org.springframework.jdbc.core.JdbcTemplate; @@ -28,10 +27,6 @@ import javax.servlet.http.Part; import java.io.*; import java.net.URL; import java.net.URLConnection; -import java.sql.ResultSet; -import java.sql.SQLException; -import java.sql.Statement; -import java.util.ArrayList; import java.util.UUID; /** @@ -108,21 +103,6 @@ public class Utils { return null; } - public static void finishSQL(ResultSet rs, Statement stmt) { - if (rs != null) { - try { - rs.close(); - } catch (SQLException e) { - } - } - if (stmt != null) { - try { - stmt.close(); - } catch (SQLException e) { - } - } - } - public static void replyJSON(HttpServletRequest request, HttpServletResponse response, String json) throws IOException { response.setContentType("application/json; charset=UTF-8"); response.setHeader("Access-Control-Allow-Origin", "*"); @@ -146,17 +126,6 @@ public class Utils { } } - public static String convertArray2String(ArrayList<Integer> mids) { - String q = ""; - for (int i = 0; i < mids.size(); i++) { - if (i > 0) { - q += ","; - } - q += mids.get(i); - } - return q; - } - public static String encodeHTML(String str) { return str.replaceAll("&", "&").replaceAll("<", "<").replaceAll(">", ">").replaceAll("'", "'").replaceAll("\"", """).replaceAll("\n", " "); } |