MCPcopy Index your code
hub / github.com/BombusMod/BombusMod / fileReadUtf

Method fileReadUtf

src/main/java/io/file/FileIO.java:102–124  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

100 }
101
102 public String fileReadUtf() {
103 InputStreamReader is = null;
104 try {
105 is = new InputStreamReader(openInputStream(), "UTF-8");
106 int fileSize = (int) fileSize();
107 char[] cbuff = new char[fileSize];
108 is.read(cbuff);
109 is.close();
110 close();
111 return new String(cbuff);
112 } catch (Exception ex) {
113 if (StaticData.Debug)
114 ex.printStackTrace();
115 } finally {
116 try {
117 is.close();
118 } catch (Exception ex) {
119 if (StaticData.Debug)
120 ex.printStackTrace();
121 }
122 }
123 return null;
124 }
125
126 public void fileWriteUtf(String src) {
127 try {

Callers 5

loadMethod · 0.95
importDataMethod · 0.95
importDataMethod · 0.95
readFileMethod · 0.95
loadIntMethod · 0.95

Calls 4

openInputStreamMethod · 0.95
fileSizeMethod · 0.95
closeMethod · 0.95
readMethod · 0.45

Tested by

no test coverage detected