public class FileUtil extends Object
| Constructor and Description |
|---|
FileUtil() |
| Modifier and Type | Method and Description |
|---|---|
static ArrayList<String> |
fileReadLines(String path)
Read file from specified path, returning an
ArrayList containing an item for each line |
static InputStream |
getStreamFromPath(String path)
Read file from specified path, returning an
InputStream for processing |
public static ArrayList<String> fileReadLines(String path) throws IOException
ArrayList containing an item for each line
Lines beginning with a # character are treated as comments and not returned in the result set.
path - Resource path or GCS URL to read file fromArrayList containing line itemsIOException - IOExceptionpublic static InputStream getStreamFromPath(String path) throws IOException
InputStream for processing
This supports both resource path and GCS URL to read from
path - Resource path or GCS URL to read file fromInputStream for reading resourceIOException - IOExceptionCopyright © 2022. All rights reserved.