MCPcopy Create free account
hub / github.com/ReZeroS/git / readFileFirstLine

Method readFileFirstLine

src/main/java/club/qqtim/util/FileUtil.java:179–189  ·  view source on GitHub ↗
(File file)

Source from the content-addressed store, hash-verified

177
178
179 public static String readFileFirstLine(File file) {
180 String value;
181 try {
182 final CharSource charSource = Files.asCharSource(file, Charsets.UTF_8);
183 value = Objects.requireNonNull(charSource.readFirstLine()).trim();
184 } catch (IOException e) {
185 log.error(e.toString());
186 return null;
187 }
188 return value;
189 }
190
191
192 /**

Callers 1

getRefInternalMethod · 0.95

Calls 2

errorMethod · 0.80
toStringMethod · 0.45

Tested by

no test coverage detected