java.lang.Object
com.pervasive.datarush.operators.io.textfile.FormatAnalyzer
- Direct Known Subclasses:
ELFAnalyzer
A generic format analyzer for log files.
Will read the first line to determine the newline character.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classContains the results of analyzing a file. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionanalyze(Path file, CharsetEncoding encoding) Analyze the specified file expecting the described character set encoding.analyze(Path file, CharsetEncoding encoding, FileClient client) Analyze the specified file expecting the described character set encoding.Analyze the given character stream as log data.analyze(String file, CharsetEncoding encoding) Analyze the specified file expecting the described character set encoding.
-
Constructor Details
-
FormatAnalyzer
public FormatAnalyzer()
-
-
Method Details
-
analyze
public FormatAnalyzer.FormatAnalysis analyze(String file, CharsetEncoding encoding) throws IOException, ParseException Analyze the specified file expecting the described character set encoding.- Parameters:
file- the file to analyze. This value will be interpreted usingPaths.asPath(String).encoding- a specification of the character set encoding of the file- Returns:
- the resulting analysis
- Throws:
IOException- if any I/O errors occur while reading the source fileParseException- if the file cannot be parsed or is otherwise malformed
-
analyze
public FormatAnalyzer.FormatAnalysis analyze(Path file, CharsetEncoding encoding) throws IOException, ParseException Analyze the specified file expecting the described character set encoding.- Parameters:
file- the file to analyzeencoding- a specification of the character set encoding of the file- Returns:
- the resulting analysis
- Throws:
IOException- if any I/O errors occur while reading the source fileParseException- if the file cannot be parsed or is otherwise malformed
-
analyze
public FormatAnalyzer.FormatAnalysis analyze(Path file, CharsetEncoding encoding, FileClient client) throws IOException, ParseException Analyze the specified file expecting the described character set encoding.- Parameters:
file- the file to analyzeencoding- a specification of the character set encoding of the fileclient- the authorization context to use for accessing the file- Returns:
- the resulting analysis
- Throws:
IOException- if any I/O errors occur while reading the source fileParseException- if the file cannot be parsed or is otherwise malformed
-
analyze
Analyze the given character stream as log data.- Parameters:
input- the data stream to analyze- Returns:
- the resulting analysis of the input
- Throws:
IOException- if any I/O errors occur while reading the source fileParseException- if the file cannot be parsed or is otherwise malformed
-