smile.data.parser
Class IOUtils
- java.lang.Object
-
- smile.data.parser.IOUtils
-
public class IOUtils extends java.lang.ObjectSimple IO stream manipulation utilities.
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method and Description static java.io.FilegetTestDataFile(java.lang.String path)Get the file object of sample dataset.static java.lang.StringgetTestDataPath(java.lang.String path)Get the file path of sample dataset.static java.io.BufferedReadergetTestDataReader(java.lang.String path)Get the reader of sample datasets.static java.util.List<java.lang.String>readLines(java.io.InputStream input)Returns the lines of anInputStreamas a list of Strings.static java.util.List<java.lang.String>readLines(java.io.InputStream input, java.nio.charset.Charset charset)Returns the lines of anInputStreamas a list of Strings.static java.util.List<java.lang.String>readLines(java.io.Reader input)Returns the lines of aReaderas a list of Strings.
-
-
-
Method Detail
-
getTestDataPath
public static java.lang.String getTestDataPath(java.lang.String path)
Get the file path of sample dataset.
-
getTestDataFile
public static java.io.File getTestDataFile(java.lang.String path)
Get the file object of sample dataset.
-
getTestDataReader
public static java.io.BufferedReader getTestDataReader(java.lang.String path) throws java.io.FileNotFoundExceptionGet the reader of sample datasets.- Throws:
java.io.FileNotFoundException
-
readLines
public static java.util.List<java.lang.String> readLines(java.io.InputStream input) throws java.io.IOExceptionReturns the lines of anInputStreamas a list of Strings.- Parameters:
input- theInputStreamto read from.- Returns:
- the list of lines.
- Throws:
java.io.IOException
-
readLines
public static java.util.List<java.lang.String> readLines(java.io.InputStream input, java.nio.charset.Charset charset) throws java.io.IOExceptionReturns the lines of anInputStreamas a list of Strings.- Parameters:
input- theInputStreamto read from.charset- a charset.- Returns:
- the list of lines.
- Throws:
java.io.IOException
-
readLines
public static java.util.List<java.lang.String> readLines(java.io.Reader input) throws java.io.IOExceptionReturns the lines of aReaderas a list of Strings.- Parameters:
input- theReaderto read from.- Returns:
- the list of lines.
- Throws:
java.io.IOException
-
-
DataMelt 3.0 © DataMelt by jWork.ORG