public class ConvertToString extends Object
Constructor and Description |
---|
ConvertToString() |
Modifier and Type | Method and Description |
---|---|
static String |
getString(File file)
Get the content of a File as a String.
|
static String |
getString(InputStream is)
Get the content of an InputStream as a String.
|
static String |
getString(String filePath)
Get the content of a file as a String.
|
public static String getString(File file) throws IOException
file
- The file where to read the string.IOException
public static String getString(String filePath) throws IOException
filePath
- The absolute path of the file.IOException
public static String getString(InputStream is) throws IOException
is
- The InputStream where to get the String.IOException
Copyright © 2010–2015 CERN. All rights reserved.