Package java.io

Examples of java.io.StreamTokenizer.resetSyntax()


      // scientific notation (E or D); however, Double.valueOf does.
      // The strategy here is to disable StreamTokenizer's number parsing.
      // We'll only get whitespace delimited words, EOL's and EOF's.
      // These words should all be numbers, for Double.valueOf to parse.

      tokenizer.resetSyntax();
      tokenizer.wordChars(0,255);
      tokenizer.whitespaceChars(0, ' ');
      tokenizer.eolIsSignificant(true);
      java.util.Vector v = new java.util.Vector();
View Full Code Here


    private static void loadCmdFile(String name, ListBuffer<String> args)
  throws IOException
    {
  Reader r = new BufferedReader(new FileReader(name));
  StreamTokenizer st = new StreamTokenizer(r);
  st.resetSyntax();
  st.wordChars(' ', 255);
  st.whitespaceChars(0, ' ');
  st.commentChar('#');
  st.quoteChar('"');
  st.quoteChar('\'');
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.