Package java.io

Examples of java.io.StreamTokenizer.lineno()


                if (testCompId != 0) {
                  compId = ChangeCompanyNumber(testCompId, compId, resultMessage);
                  globalCompId = compId;
                } else {
                  Log.log(Log.DEBUG, this, "#FNR Cannot use non-number company id, row=" + in.lineno());
                  resultMessage.append("#FNR Cannot use non-number company id, row=" + in.lineno() + "\n");
                }
              } else {
                globalCompId = iCompanyToResoreTo;
                compId = iCompanyToResoreTo;
              }
View Full Code Here


              AddCustomer(dim, CustNumber, CustString, CustomerName, dimensions, Customers, compId, resultMessage);
              getWholeRow(in);
              //clean out to the end of the row
            } else if (in.sval.equals("VER")) {
              if (SIE_typen != 4) {
                throw new ParseException("#VER not allowed in SIE type=" + SIE_typen + " line=" + in.lineno(), 0);
              }
              AddTransaction(convertTransNums, serieMultiplier, Customers, in, compId, resultMessage, yearDef);
            } else {
              //this is an unused line.  Get the tokens until the end of the line.
              Log.log(Log.DEBUG, this, "Ignored row=" + in.lineno() + " ; #" + getWholeRow(in));
View Full Code Here

                throw new ParseException("#VER not allowed in SIE type=" + SIE_typen + " line=" + in.lineno(), 0);
              }
              AddTransaction(convertTransNums, serieMultiplier, Customers, in, compId, resultMessage, yearDef);
            } else {
              //this is an unused line.  Get the tokens until the end of the line.
              Log.log(Log.DEBUG, this, "Ignored row=" + in.lineno() + " ; #" + getWholeRow(in));
            }
          }
          break;
        default:
          resultMessage.append("UNKNOWN character in row=" + in.lineno() + " ;field=\""
View Full Code Here

              Log.log(Log.DEBUG, this, "Ignored row=" + in.lineno() + " ; #" + getWholeRow(in));
            }
          }
          break;
        default:
          resultMessage.append("UNKNOWN character in row=" + in.lineno() + " ;field=\""
               + in.ttype + "\"" + getWholeRow(in) + "\n");
          break;
      }
    }
    r.close();
View Full Code Here

    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

        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

        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

        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

        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

   
        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

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.