public class TextStream
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static java.util.Set<java.lang.String> |
ABBREVIATIONS |
static java.lang.String |
HTTP |
static java.util.Set<java.lang.String> |
IGNORABLE |
static java.lang.String |
TERMINATORS |
static java.lang.String |
TOKENS |
static java.lang.String |
WHITESPACE |
Constructor and Description |
---|
TextStream(java.lang.String text) |
Modifier and Type | Method and Description |
---|---|
java.util.List<java.lang.String> |
allWords() |
boolean |
atEnd() |
boolean |
atStart() |
void |
backup() |
void |
backup(int count) |
void |
backupTo(char token) |
void |
backupTo(char token,
boolean including) |
void |
backupToAll(java.lang.String tokens) |
void |
backupToAll(java.lang.String tokens,
boolean including) |
void |
backupToAny(java.lang.String tokens) |
void |
backupToAny(java.lang.String tokens,
boolean including) |
void |
backupWhitespace() |
java.util.List<java.lang.String> |
csv() |
char |
current() |
java.lang.String |
currentLine() |
int |
currentLineColumn() |
int |
currentLineNumber() |
int |
getPosition() |
java.lang.String |
getText() |
boolean |
isWordSymbol(char character) |
char |
last() |
char |
next() |
java.lang.String |
next(int count) |
java.lang.String |
nextLine() |
java.lang.String |
nextParagraph(int max)
Return the next paragraph text including full sentences up to the max text size.
|
java.lang.String |
nextQuotes() |
java.lang.String |
nextQuotesExcludeDoubleQuote() |
java.lang.String |
nextSentence() |
java.lang.String |
nextSimpleWord() |
java.lang.String |
nextStringDoubleQuotes() |
java.lang.String |
nextStringQuotes() |
java.lang.String |
nextStringWithBracketsDoubleQuotes() |
java.lang.String |
nextWhitespace() |
java.lang.String |
nextWord() |
char |
peek() |
java.lang.String |
peek(int count) |
int |
peekCodePoint() |
char |
peekPrevious() |
java.lang.String |
peekPreviousWord() |
java.lang.String |
peekWord() |
char |
previous() |
java.lang.String |
previous(int count) |
void |
reset() |
void |
setPosition(int index) |
void |
skip() |
void |
skip(int count) |
void |
skipBrackets() |
void |
skipLine() |
void |
skipQuotes() |
void |
skipSentence() |
void |
skipStringBrackets() |
void |
skipStringDoubleQuoteBrackets() |
void |
skipStringDoubleQuotes() |
void |
skipStringQuotes() |
void |
skipStringWithBracketsDoubleQuotes() |
void |
skipTo(char token) |
boolean |
skipTo(char token,
boolean including) |
void |
skipToAll(java.lang.String tokens) |
boolean |
skipToAll(java.lang.String tokens,
boolean including) |
void |
skipToAny(java.lang.String tokens) |
void |
skipToAny(java.lang.String tokens,
boolean including) |
boolean |
skipWhitespace() |
void |
skipWord() |
java.lang.String |
toString() |
java.lang.String |
upTo(char token) |
java.lang.String |
upTo(char token,
boolean including) |
java.lang.String |
upTo(char token,
boolean including,
boolean resetIfNotFound) |
java.lang.String |
upToAll(java.lang.String tokens) |
java.lang.String |
upToAll(java.lang.String tokens,
boolean including) |
java.lang.String |
upToAll(java.lang.String tokens,
boolean including,
boolean resetIfNotFound) |
java.lang.String |
upToAny(java.lang.String tokens) |
java.lang.String |
upToAny(java.lang.String tokens,
boolean including) |
java.lang.String |
upToEnd() |
public static final java.lang.String WHITESPACE
public static final java.lang.String HTTP
public static final java.lang.String TOKENS
public static final java.lang.String TERMINATORS
public static java.util.Set<java.lang.String> ABBREVIATIONS
public static java.util.Set<java.lang.String> IGNORABLE
public void reset()
public char last()
public char current()
public char peekPrevious()
public char peek()
public int peekCodePoint()
public char next()
public char previous()
public void skip()
public void skip(int count)
public void backup(int count)
public void backup()
public java.lang.String peek(int count)
public java.lang.String previous(int count)
public java.lang.String next(int count)
public boolean atEnd()
public boolean atStart()
public java.lang.String upTo(char token)
public void skipTo(char token)
public java.lang.String upToEnd()
public java.lang.String upTo(char token, boolean including)
public java.lang.String upTo(char token, boolean including, boolean resetIfNotFound)
public boolean skipTo(char token, boolean including)
public void backupTo(char token)
public void backupTo(char token, boolean including)
public java.lang.String upToAny(java.lang.String tokens)
public java.lang.String upToAny(java.lang.String tokens, boolean including)
public void skipToAny(java.lang.String tokens)
public void skipToAny(java.lang.String tokens, boolean including)
public java.lang.String upToAll(java.lang.String tokens)
public java.lang.String upToAll(java.lang.String tokens, boolean including)
public java.lang.String upToAll(java.lang.String tokens, boolean including, boolean resetIfNotFound)
public void skipToAll(java.lang.String tokens)
public boolean skipToAll(java.lang.String tokens, boolean including)
public void backupToAll(java.lang.String tokens)
public void backupToAll(java.lang.String tokens, boolean including)
public void backupToAny(java.lang.String tokens)
public void backupToAny(java.lang.String tokens, boolean including)
public java.lang.String peekWord()
public java.util.List<java.lang.String> allWords()
public java.util.List<java.lang.String> csv()
public java.lang.String peekPreviousWord()
public boolean isWordSymbol(char character)
public java.lang.String nextQuotes()
public java.lang.String nextStringQuotes()
public java.lang.String nextStringDoubleQuotes()
public java.lang.String nextStringWithBracketsDoubleQuotes()
public java.lang.String nextQuotesExcludeDoubleQuote()
public void skipStringQuotes()
public void skipStringDoubleQuotes()
public void skipStringWithBracketsDoubleQuotes()
public void skipQuotes()
public void skipBrackets()
public void skipStringBrackets()
public void skipStringDoubleQuoteBrackets()
public java.lang.String nextWord()
public java.lang.String nextSimpleWord()
public void skipWord()
public java.lang.String nextParagraph(int max)
public java.lang.String nextSentence()
public void skipSentence()
public java.lang.String nextWhitespace()
public boolean skipWhitespace()
public void backupWhitespace()
public java.lang.String nextLine()
public java.lang.String currentLine()
public int currentLineNumber()
public int currentLineColumn()
public void skipLine()
public int getPosition()
public void setPosition(int index)
public java.lang.String getText()
public java.lang.String toString()
toString
in class java.lang.Object