Commit 3d7ca65f authored by Quxl's avatar Quxl

z

parent be7beeb4
...@@ -3,11 +3,15 @@ package com.egolm.film.util; ...@@ -3,11 +3,15 @@ package com.egolm.film.util;
import java.io.InputStream; import java.io.InputStream;
import java.util.Random; import java.util.Random;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import com.egolm.common.FileUtil; import com.egolm.common.FileUtil;
import com.egolm.common.StringUtil; import com.egolm.common.StringUtil;
public class Common { public class Common {
private static final Logger logger = LoggerFactory.getLogger(Common.class);
public static final String SOURCES="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890"; public static final String SOURCES="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890";
public static String getGenerateString(int length) { public static String getGenerateString(int length) {
...@@ -24,6 +28,7 @@ public class Common { ...@@ -24,6 +28,7 @@ public class Common {
} }
public static String getStringAsStream(String filename) { public static String getStringAsStream(String filename) {
logger.debug("read at classpath: " + filename);
InputStream stream = Common.class.getClassLoader().getResourceAsStream(filename); InputStream stream = Common.class.getClassLoader().getResourceAsStream(filename);
return new String(FileUtil.streamToBytes(stream)); return new String(FileUtil.streamToBytes(stream));
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment