| @@ -30,15 +30,9 @@ public class LanguageDetect { | |||||
| for (Resource resource:resources) { | for (Resource resource:resources) { | ||||
| try { | try { | ||||
| InputStream inputStream = resource.getInputStream(); | InputStream inputStream = resource.getInputStream(); | ||||
| byte[] bytes = new byte[inputStream.available()]; | |||||
| byte[] bytes = new byte[0]; | |||||
| inputStream.read(bytes); | inputStream.read(bytes); | ||||
| String str = new String(bytes); | |||||
| log.error("size "+inputStream.available()); | |||||
| if(str.endsWith("}")){ | |||||
| profile.add(str); | |||||
| }else{ | |||||
| log.error("查错 名称"+resource.getFilename()); | |||||
| } | |||||
| profile.add(new String(bytes)); | |||||
| } catch (IOException e) { | } catch (IOException e) { | ||||
| e.printStackTrace(); | e.printStackTrace(); | ||||