+ Added + asBytes(), + + asText(encoding), + and + asLines(encoding) methods into + FileObject + to simplify reading of its content. +
+for
loops:
+ * + * for (String line : fo.asLines()) { + * // do something + * } + *+ * @return string representing the content of the file + * @exception IOException in case the content cannot be fully read + * @since 7.21 + */ + public Iterable
for
loops:
+ * + * for (String line : fo.asLines("UTF-8")) { + * // do something + * } + *+ * @param encoding the encoding to use + * @return string representing the content of the file + * @exception IOException in case the content cannot be fully read + * @since 7.21 + */ + public Iterable