Package java.io

Examples of java.io.StreamTokenizer.parseNumbers()


    }

    try
    {
      final StreamTokenizer strtok = new StreamTokenizer(new StringReader(value));
      strtok.parseNumbers();
      final int firstToken = strtok.nextToken();
      if (firstToken != StreamTokenizer.TT_NUMBER)
      {
        return null;
      }
View Full Code Here


    File fullFile = tool.getImportedVocabFile(vocabName);
    try {
      FileReader fr = new FileReader(fullFile);
      BufferedReader br = new BufferedReader(fr);
      StreamTokenizer tokenizer = new StreamTokenizer(br);
      tokenizer.parseNumbers();
      tokenizer.wordChars('_', '_');
      tokenizer.eolIsSignificant(true);
      tokenizer.slashSlashComments(true);
      tokenizer.slashStarComments(true);
      tokenizer.ordinaryChar('=');
View Full Code Here

    }

    try
    {
      final StreamTokenizer strtok = new StreamTokenizer(new StringReader(value));
      strtok.parseNumbers();
      final int firstToken = strtok.nextToken();
      if (firstToken != StreamTokenizer.TT_NUMBER)
      {
        return null;
      }
View Full Code Here

    private static StreamTokenizer getJavaTokenizer( Reader reader )
    {
        StreamTokenizer tok = new StreamTokenizer( reader );
        tok.eolIsSignificant( false );
        tok.lowerCaseMode( false );
        tok.parseNumbers();
        tok.slashSlashComments( true );
        tok.slashStarComments( true );
        tok.wordChars( '_', '_' );
        tok.wordChars( '@', '@' );
        tok.wordChars( '[', '[' );
View Full Code Here

   
    try
    {
      StreamTokenizer tokenizer = new StreamTokenizer( new StringReader( line ));
      tokenizer.whitespaceChars( ' ', ' ' );
      tokenizer.parseNumbers();
      tokenizer.quoteChar( '"' );
     
      // info face="Times New Roman" size=24 bold=0 italic=0 charset="" unicode=1 stretchH=100 smooth=1 aa=4 padding=1,1,1,1 spacing=1,1

      // info
View Full Code Here

    try
    {
      StreamTokenizer tokenizer = new StreamTokenizer( new StringReader( line ));
      tokenizer.whitespaceChars( ' ', ' ' );
      tokenizer.parseNumbers();
      tokenizer.quoteChar( '"' );
     
      // page id=0 file="Times New Roman--24_00.tga"

      // page
View Full Code Here

  }

  public Graph(File f) throws NumberFormatException, java.io.IOException {
    java.io.FileReader r = new java.io.FileReader(f);
    StreamTokenizer tok = new StreamTokenizer(r);
    tok.parseNumbers();

    int nV = nextNumber(tok);
    int nE = nextNumber(tok);

    numberOfVertices = nV;
View Full Code Here

    private static StreamTokenizer getJavaTokenizer( Reader reader )
    {
        StreamTokenizer tok = new StreamTokenizer( reader );
        tok.eolIsSignificant( false );
        tok.lowerCaseMode( false );
        tok.parseNumbers();
        tok.slashSlashComments( true );
        tok.slashStarComments( true );
        tok.wordChars( '_', '_' );
        tok.wordChars( '@', '@' );
        tok.wordChars( '[', '[' );
View Full Code Here

            in = new BufferedReader(new InputStreamReader(Resources.getResourceAsStream(filename)));
        } catch (Exception e) {
            throw new RuntimeException("Can't open colormap file: " + filename);
        }
        StreamTokenizer st = new StreamTokenizer(in);
        st.parseNumbers();
        float[][] lut = new float[256][3];
        int tok;
        int n = 0;
        while ((tok = st.nextToken()) != StreamTokenizer.TT_EOF) {
            if (tok != StreamTokenizer.TT_NUMBER) {
View Full Code Here

            in = new BufferedReader(new InputStreamReader(Resources.getResourceAsStream(filename)));
        } catch (Exception e) {
            throw new RuntimeException("Can't open colormap file: " + filename);
        }
        StreamTokenizer st = new StreamTokenizer(in);
        st.parseNumbers();
        float[] itt = new float[256];
        int tok;
        while ((tok = st.nextToken()) != StreamTokenizer.TT_EOF) {
            if (tok != StreamTokenizer.TT_NUMBER) {
                in.close();
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.