Package net.sf.basedb.util.bfs
Interface BfsParser
- All Superinterfaces:
AutoCloseable
- All Known Implementing Classes:
AnnotationParser
,DataParser
,MetadataParser
,SynchronizedSpotDataParser
Interface that it is recommended that all BFS parsers should implement.
The main purpose is to expose information about the parsing progress to
interested parties, for example,
EventHandler
:s.- Version:
- 2.15
- Author:
- Nicklas
- Last modified
- $Date: 2018-12-12 15:41:10 +0100 (on, 12 dec 2018) $
-
Method Summary
Modifier and TypeMethodDescriptionvoid
close()
Close the parser and relase underlying system resources that are associated with it.int
Get the current line number.Get the filename of the file that is being parsed.long
Get the size of the file that is being parsed.long
Get the number of parsed bytes so far.
-
Method Details
-
getFilename
String getFilename()Get the filename of the file that is being parsed.- Returns:
- The filename or null if not known
-
getFileSize
long getFileSize()Get the size of the file that is being parsed.- Returns:
- The size of the file or -1 if not known
-
getCurrentLine
int getCurrentLine()Get the current line number.- Returns:
- The line number, starting at 1 for the first line in the file, or -1 if not known
-
getParsedBytes
long getParsedBytes()Get the number of parsed bytes so far.- Returns:
- The number of bytes that has been parsed, or -1 if not known
-
close
void close()Close the parser and relase underlying system resources that are associated with it.- Specified by:
close
in interfaceAutoCloseable
-