Package org.eclipse.jface.text.rules
Class BufferedRuleBasedScanner
java.lang.Object
org.eclipse.jface.text.rules.RuleBasedScanner
org.eclipse.jface.text.rules.BufferedRuleBasedScanner
- All Implemented Interfaces:
- ICharacterScanner,- ITokenScanner
- Direct Known Subclasses:
- RuleBasedPartitionScanner
A buffered rule based scanner. The buffer always contains a section
 of a fixed size of the document to be scanned. Completely adheres to
 the contract of 
RuleBasedScanner.- Since:
- 3.14
- 
Field SummaryFields inherited from class org.eclipse.jface.text.rules.RuleBasedScannerfColumn, fDefaultReturnToken, fDelimiters, fDocument, fOffset, fRangeEnd, fRules, fTokenOffset, UNDEFINEDFields inherited from interface org.eclipse.jface.text.rules.ICharacterScannerEOF
- 
Constructor SummaryConstructorsModifierConstructorDescriptionprotectedCreates a new buffered rule based scanner which does not have any rule and a default buffer size of 500 characters.BufferedRuleBasedScanner(int size) Creates a new buffered rule based scanner which does not have any rule.
- 
Method SummaryModifier and TypeMethodDescriptionintread()Returns the next character or EOF if end of file has been reachedprotected voidsetBufferSize(int size) Sets the buffer to the given number of characters.voidConfigures the scanner by providing access to the document range that should be scanned.voidunread()Rewinds the scanner before the last read character.Methods inherited from class org.eclipse.jface.text.rules.RuleBasedScannergetColumn, getLegalLineDelimiters, getTokenLength, getTokenOffset, nextToken, setDefaultReturnToken, setRules
- 
Constructor Details- 
BufferedRuleBasedScannerprotected BufferedRuleBasedScanner()Creates a new buffered rule based scanner which does not have any rule and a default buffer size of 500 characters.
- 
BufferedRuleBasedScannerpublic BufferedRuleBasedScanner(int size) Creates a new buffered rule based scanner which does not have any rule. The buffer size is set to the given number of characters.- Parameters:
- size- the buffer size
 
 
- 
- 
Method Details- 
setBufferSizeprotected void setBufferSize(int size) Sets the buffer to the given number of characters.- Parameters:
- size- the buffer size
 
- 
setRangeDescription copied from interface:ITokenScannerConfigures the scanner by providing access to the document range that should be scanned.- Specified by:
- setRangein interface- ITokenScanner
- Overrides:
- setRangein class- RuleBasedScanner
- Parameters:
- document- the document to scan
- offset- the offset of the document range to scan
- length- the length of the document range to scan
 
- 
readpublic int read()Description copied from interface:ICharacterScannerReturns the next character or EOF if end of file has been reached- Specified by:
- readin interface- ICharacterScanner
- Overrides:
- readin class- RuleBasedScanner
- Returns:
- the next character or EOF
 
- 
unreadpublic void unread()Description copied from interface:ICharacterScannerRewinds the scanner before the last read character.- Specified by:
- unreadin interface- ICharacterScanner
- Overrides:
- unreadin class- RuleBasedScanner
 
 
-