public class TableUtil extends Object
| 构造器 | 说明 |
|---|---|
TableUtil() |
| 限定符和类型 | 方法 | 说明 |
|---|---|---|
static DataTable |
ave_Month(List<Array> data,
List<String> colNames,
List<Date> time) |
Average month by month
|
static String |
getDateFormat(String dt) |
Get date format string
|
static List<String> |
getFormats(String formatSpec) |
Get format list
|
static List<String> |
getYearMonths(List<Date> time) |
Get year months
|
static TableData |
readASCIIFile(String fileName,
String delimiter,
int headerLines,
String formatSpec,
String encoding,
boolean readVarNames) |
Read data table from ASCII file
|
static TableData |
readASCIIFile(String fileName,
String delimiter,
int headerLines,
String formatSpec,
String encoding,
boolean readVarNames,
List<Object> usecolsin) |
Read data table from ASCII file
|
static DataType |
toDataTypes(String dt) |
To data type - MeteoInfo
|
public static TableData readASCIIFile(String fileName, String delimiter, int headerLines, String formatSpec, String encoding, boolean readVarNames) throws FileNotFoundException, IOException, Exception
fileName - File namedelimiter - DelimiterheaderLines - Number of lines to skip at begining of the fileformatSpec - Format specifiers stringencoding - Fle encodingreadVarNames - Read variable names or notFileNotFoundExceptionIOExceptionExceptionpublic static TableData readASCIIFile(String fileName, String delimiter, int headerLines, String formatSpec, String encoding, boolean readVarNames, List<Object> usecolsin) throws FileNotFoundException, IOException, Exception
fileName - File namedelimiter - DelimiterheaderLines - Number of lines to skip at begining of the fileformatSpec - Format specifiers stringencoding - Fle encodingreadVarNames - Read variable names or notusecolsin - Filter columns by column names or indicesFileNotFoundExceptionIOExceptionExceptionpublic static List<String> getFormats(String formatSpec)
formatSpec - Input format specific stringpublic static DataType toDataTypes(String dt)
dt - Data type stringpublic static String getDateFormat(String dt)
dt - Format stringpublic static DataTable ave_Month(List<Array> data, List<String> colNames, List<Date> time) throws Exception
data - Data array listcolNames - Column namestime - Time listExceptionCopyright © 2019. All rights reserved.