public class SimpleParser extends Object
Modifier and Type | Field and Description |
---|---|
protected boolean |
eof |
protected boolean |
eol |
protected BufferedReader |
in |
protected boolean |
intern |
protected StringBuilder |
sb |
Constructor and Description |
---|
SimpleParser(BufferedReader in,
boolean intern) |
Modifier and Type | Method and Description |
---|---|
boolean |
isEOF() |
boolean |
isEOL() |
protected double |
parseDouble(StringBuilder s) |
protected int |
parseInt(StringBuilder sb)
custom parseInt: 4 fois plus performant que Integer.parseInt
ne supporte que les chiffres positif, et la chaine doit forcement etre un nombre valide
|
protected void |
read(char sep) |
double |
readDouble(char sep) |
int |
readInt(char sep) |
String |
readString(char sep) |
protected boolean intern
protected BufferedReader in
protected StringBuilder sb
protected boolean eof
protected boolean eol
public SimpleParser(BufferedReader in, boolean intern)
in
- BufferedReader because Reader must support mark and resetpublic boolean isEOF()
public boolean isEOL()
protected void read(char sep) throws IOException
IOException
public String readString(char sep) throws IOException
IOException
public int readInt(char sep) throws IOException
IOException
public double readDouble(char sep) throws IOException
IOException
protected double parseDouble(StringBuilder s) throws IOException
IOException
protected int parseInt(StringBuilder sb)
sb
- la chaine representant l'entierCopyright © 1999–2020 CodeLutin. All rights reserved.