public class ArffUtilities
extends java.lang.Object
| Modifier and Type | Method and Description |
|---|---|
static int |
countDatasetEntries(java.io.File file,
boolean hasHeader)
Counts the amount of datapoint entries in an ARFF file.
|
static java.lang.String |
extractArffHeader(java.io.File file)
Extract the header of an ARFF file as a string.
|
static void |
skipWithReaderToDatapoints(java.io.BufferedReader reader)
Skips with a given reader all comment lines and the header lines of an ARFF
file until the first datapoint is reached.
|
public static java.lang.String extractArffHeader(java.io.File file)
throws java.io.IOException
file - Given ARFF file of which the header shall be extracted.java.io.IOException - Could not read from the given file.public static int countDatasetEntries(java.io.File file,
boolean hasHeader)
throws java.io.IOException
file - Given ARFF file where the entries are written in.hasHeader - If true the count will start after an '@data' annotation,
otherwise it will just count every line, which is not a comment.java.io.IOException - Could not read from the given file.public static void skipWithReaderToDatapoints(java.io.BufferedReader reader)
throws java.io.IOException
reader - Reader that should be skipped to the data.java.io.IOException - Reader was not able to read the file.