lumis.util.parse
Class BaseFileParser
java.lang.Object
lumis.util.parse.BaseFileParser
- All Implemented Interfaces:
- IFileParser
- Direct Known Subclasses:
- DocParser, HtmlParser, PdfParser, TxtParser
public abstract class BaseFileParser
- extends Object
- implements IFileParser
Base implementation of IFileParser
.
- Since:
- 4.0.10
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
BaseFileParser
public BaseFileParser()
extract
public abstract String extract(InputStream inputStream,
Charset charset)
throws ParseException
- Specified by:
extract
in interface IFileParser
- Throws:
ParseException
extract
public String extract(File inputFile,
Charset charset)
throws ParseException,
FileNotFoundException
- Specified by:
extract
in interface IFileParser
- Throws:
ParseException
FileNotFoundException
inferCharset
protected boolean inferCharset()
extract
public String extract(File inputFile)
throws ParseException
- Specified by:
extract
in interface IFileParser
- Throws:
ParseException
extract
public String extract(InputStream inputStream)
throws ParseException,
IOException
- Description copied from interface:
IFileParser
- Extract text from an input stream.
- Specified by:
extract
in interface IFileParser
- Parameters:
inputStream
- the input stream.
- Returns:
- the text extracted.
- Throws:
ParseException
- if an error occurred while parsing
stream content.
IOException
- if an I/O error occurred.
Lumisportal 5.5.0.091130 - Copyright © 2001-2007, Lumis. All Rights Reserved.