|
StocksMonitor 1.5.0 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
ObjectFileUtil
public final class FileUtil
Collected methods to ease manipulation of text files.
| Constructor Summary | |
|---|---|
FileUtil()
|
|
| Method Summary | |
|---|---|
static List<String> |
getStreamAsList(InputStream aInputStream)
Return the full content of aInputStream as an unmodifiable List of Strings, one for each line of input. |
static String |
getStreamAsString(InputStream aInputStream)
Return the full content of aInputStream as a String. |
| Methods inherited from class Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public FileUtil()
| Method Detail |
|---|
public static String getStreamAsString(InputStream aInputStream)
If aInputStream has no content, then return an empty String.
public static List<String> getStreamAsList(InputStream aInputStream)
The iteration order of the returned List reflects the line order in the underlying stream. If aInputStream has no content, then return an empty List.
Intended for text files having structured data, with each line corresponding to a single record. The caller may use this method to transform such a file into a collection, which may be iterated in the usual fashion.
|
StocksMonitor 1.5.0 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||