Class SimpleParser

java.lang.Object
fr.ifremer.isisfish.util.matrix.SimpleParser

public class SimpleParser extends Object
Very simple parse write for efficiency. Input stream must be correct no check is done on data.
Version:
$Revision$ Last update: $Date$ by : $Author$
Author:
poussin
  • Field Details

    • intern

      protected boolean intern
    • in

      protected BufferedReader in
    • sb

      protected StringBuilder sb
    • eof

      protected boolean eof
    • eol

      protected boolean eol
  • Constructor Details

    • SimpleParser

      public SimpleParser(BufferedReader in, boolean intern)
      Parameters:
      in - BufferedReader because Reader must support mark and reset
  • Method Details

    • isEOF

      public boolean isEOF()
      Returns:
      true if end of file
    • isEOL

      public boolean isEOL()
      Returns:
      true if end of line
    • read

      protected void read(char sep) throws IOException
      Throws:
      IOException
    • readString

      public String readString(char sep) throws IOException
      Throws:
      IOException
    • readInt

      public int readInt(char sep) throws IOException
      Throws:
      IOException
    • readDouble

      public double readDouble(char sep) throws IOException
      Throws:
      IOException
    • parseDouble

      protected double parseDouble(StringBuilder s) throws IOException
      Throws:
      IOException
    • parseInt

      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
      Parameters:
      sb - la chaine representant l'entier
      Returns: