(File file)
| 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 | /** |
no test coverage detected