public class PcFileNetworkIoUtils
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
private static org.slf4j.Logger |
logger
The logger.
|
| Constructor and Description |
|---|
PcFileNetworkIoUtils() |
| Modifier and Type | Method and Description |
|---|---|
static java.util.List<java.lang.String> |
getListFromLineByLineText(java.lang.String sourcePath,
HostsSourceType sourceType) |
static boolean |
isFileExist(java.lang.String filePath)
Checks if is file exist.
|
static java.lang.String |
readAll(java.io.Reader rd)
Read all.
|
static java.lang.String |
readFileContentToString(java.lang.String filePath)
Read file content to string.
|
static java.io.InputStream |
readFileToInputStream(java.lang.String filePath)
20140907: for key management get from file to input stream.
|
static java.lang.String |
readStringFromUrlGeneric(java.lang.String url)
Read string from url generic.
|
public static java.io.InputStream readFileToInputStream(java.lang.String filePath)
throws java.io.FileNotFoundException
filePath - the file pathjava.io.FileNotFoundException - the file not found exceptionpublic static boolean isFileExist(java.lang.String filePath)
filePath - the file pathpublic static java.lang.String readFileContentToString(java.lang.String filePath)
throws java.io.IOException
filePath - the file pathjava.io.IOException - Signals that an I/O exception has occurred.public static java.lang.String readStringFromUrlGeneric(java.lang.String url)
throws java.io.IOException
url - the urljava.io.IOException - Signals that an I/O exception has occurred.public static java.lang.String readAll(java.io.Reader rd)
throws java.io.IOException
rd - the rdjava.io.IOException - Signals that an I/O exception has occurred.public static java.util.List<java.lang.String> getListFromLineByLineText(java.lang.String sourcePath,
HostsSourceType sourceType)