Examples of lineno()


Examples of java.io.StreamTokenizer.lineno()

    s.ordinaryChar('.');

    int token;
    while ((token = s.nextToken()) != StreamTokenizer.TT_EOF) {
      if (token == StreamTokenizer.TT_WORD) {
        index.add(s.sval, s.lineno());
      }
    }

    System.out.println(index);
  }
View Full Code Here

Examples of java.io.StreamTokenizer.lineno()

        int tok;
        int n = 0;
        while ((tok = st.nextToken()) != StreamTokenizer.TT_EOF) {
            if (tok != StreamTokenizer.TT_NUMBER) {
                in.close();
                throw new RuntimeException("Error in colormap file: " + filename + " at line " + st.lineno());
            }
            lut[st.lineno() - 1][n] = (float) st.nval;
            if (++n > 2)
                n = 0;
        }
View Full Code Here

Examples of java.io.StreamTokenizer.lineno()

        while ((tok = st.nextToken()) != StreamTokenizer.TT_EOF) {
            if (tok != StreamTokenizer.TT_NUMBER) {
                in.close();
                throw new RuntimeException("Error in colormap file: " + filename + " at line " + st.lineno());
            }
            lut[st.lineno() - 1][n] = (float) st.nval;
            if (++n > 2)
                n = 0;
        }
        in.close();
        return lut;
View Full Code Here

Examples of java.io.StreamTokenizer.lineno()

        float[] itt = new float[256];
        int tok;
        while ((tok = st.nextToken()) != StreamTokenizer.TT_EOF) {
            if (tok != StreamTokenizer.TT_NUMBER) {
                in.close();
                throw new RuntimeException("Error in colormap file: " + filename + " at line " + st.lineno());
            }
            itt[st.lineno() - 1] = (float) st.nval;
        }
        in.close();
        return itt;
View Full Code Here

Examples of java.io.StreamTokenizer.lineno()

        while ((tok = st.nextToken()) != StreamTokenizer.TT_EOF) {
            if (tok != StreamTokenizer.TT_NUMBER) {
                in.close();
                throw new RuntimeException("Error in colormap file: " + filename + " at line " + st.lineno());
            }
            itt[st.lineno() - 1] = (float) st.nval;
        }
        in.close();
        return itt;
    }
}
View Full Code Here

Examples of java.io.StreamTokenizer.lineno()

   
        t.nextToken();
        while ( t.ttype == '<' ) {
            t.nextToken();
            if ( t.ttype != StreamTokenizer.TT_WORD )
                throw new IOException( t.lineno()+": Word expected after '<'" );
            String crsName = t.sval;
            t.nextToken();
            if ( t.ttype != '>' )
                throw new IOException( t.lineno()+": '>' expected" );
            t.nextToken();
View Full Code Here

Examples of java.io.StreamTokenizer.lineno()

            if ( t.ttype != StreamTokenizer.TT_WORD )
                throw new IOException( t.lineno()+": Word expected after '<'" );
            String crsName = t.sval;
            t.nextToken();
            if ( t.ttype != '>' )
                throw new IOException( t.lineno()+": '>' expected" );
            t.nextToken();
            List v = new ArrayList();

            while ( t.ttype != '<' ) {
                if ( t.ttype == '+' )
View Full Code Here

Examples of java.io.StreamTokenizer.lineno()

            while ( t.ttype != '<' ) {
                if ( t.ttype == '+' )
                    t.nextToken();
                if ( t.ttype != StreamTokenizer.TT_WORD )
                    throw new IOException( t.lineno()+": Word expected after '+'" );
                String key = t.sval;
                t.nextToken();
       

                // parse =arg, if any
View Full Code Here

Examples of java.io.StreamTokenizer.lineno()

                    addParam(v, key, null);
                }
            }
            t.nextToken();
            if ( t.ttype != '>' )
                throw new IOException( t.lineno()+": '<>' expected" );
            t.nextToken();
     
            // found requested CRS?
            if ( crsName.equals( name ) ) {
                String[] args = (String[]) v.toArray( new String[0] );
View Full Code Here

Examples of java.io.StreamTokenizer.lineno()

        passwordMap = new HashMap<String, byte[]>();
        while (stok.nextToken() != StreamTokenizer.TT_EOF) {
            String name = stok.sval;
            if (stok.nextToken() == StreamTokenizer.TT_EOF) {
                throw new IOException("Unexpected EOL at line " +
                                      stok.lineno());
            }
            byte [] password = decodeBytes(stok.sval.getBytes("UTF-8"));
            passwordMap.put(name, password);
        }
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.