MCPcopy Create free account
hub / github.com/diyhi/bbs / getResourceAsReader

Method getResourceAsReader

src/main/java/cms/utils/SqlFile.java:93–107  ·  view source on GitHub ↗

获取资源 @param sqlPath SQL路径 @param charset 编码 @return @throws IOException

(String sqlPath,String charset)

Source from the content-addressed store, hash-verified

91 * @throws IOException
92 */
93 private static Reader getResourceAsReader(String sqlPath,String charset) throws IOException {
94 Charset c = null;
95 if(charset != null && !charset.isEmpty()){
96 c = Charset.forName(charset);
97 }
98
99 Reader reader;
100 if(c == null) {
101 reader = new InputStreamReader(new FileInputStream(sqlPath));
102 }else {
103 reader = new InputStreamReader(new FileInputStream(sqlPath), c);
104 }
105
106 return reader;
107 }
108
109
110 /**

Callers 1

importSQLMethod · 0.95

Calls 1

isEmptyMethod · 0.45

Tested by

no test coverage detected