public abstract class CellsTextExtractorBase extends TextExtractor
Provides the base class of text extractors for spreadsheets.
Modifier | Constructor and Description |
---|---|
protected |
CellsTextExtractorBase(InputStream stream,
LoadOptions loadOptions)
Initializes a new instance of the
CellsTextExtractorBase class. |
Modifier and Type | Method and Description |
---|---|
protected void |
dispose(boolean disposing)
Releases the unmanaged resources used by the extractor.
|
String |
extractSheet(int sheetIndex)
Extracts all characters from the sheet with
sheetIndex and returns the data as a string. |
protected String |
extractText()
Extracts all characters from the current position to the end of the text extractor
and returns them as one string.
|
protected String |
extractTextLine()
Extracts a line of characters from the text extractor and returns the data as a string.
|
int |
getSheetCount()
Gets a total count of the sheets.
|
CellsSheetInfo |
getSheetInfo(int sheetIndex)
Returns an information of the sheet.
|
protected String |
prepareLine()
Returns a line of the text.
|
void |
reset()
Resets the current document.
|
protected void |
setSheetCount(int value)
Sets a total count of the sheets.
|
checkDisposed, close, dispose, extractAll, extractLine, getEncoding, getMediaType, getPassword, isDisposed, setEncoding, setMediaType
protected CellsTextExtractorBase(InputStream stream, LoadOptions loadOptions)
Initializes a new instance of the CellsTextExtractorBase
class.
stream
- The stream of the document.loadOptions
- The options of loading the file.public int getSheetCount()
Gets a total count of the sheets.
protected void setSheetCount(int value)
Sets a total count of the sheets.
value
- A total count of the sheets.public String extractSheet(int sheetIndex)
Extracts all characters from the sheet with sheetIndex
and returns the data as a string.
sheetIndex
- The index of the sheet.public CellsSheetInfo getSheetInfo(int sheetIndex)
Returns an information of the sheet.
sheetIndex
- The index of the sheet.CellsSheetInfo
class.public void reset()
Resets the current document.
ExtractLine
method will return the first line of the document.
reset
in class TextExtractor
protected void dispose(boolean disposing)
Releases the unmanaged resources used by the extractor.
dispose
in class TextExtractor
disposing
- A boolean true if invoked from Dispose; otherwise, false.protected String extractTextLine()
Extracts a line of characters from the text extractor and returns the data as a string.
extractTextLine
in class TextExtractor
protected String extractText()
Extracts all characters from the current position to the end of the text extractor and returns them as one string.
extractText
in class TextExtractor
protected String prepareLine()
Returns a line of the text.
prepareLine
in class TextExtractor
Copyright © 2019. All rights reserved.