Package java.io

Examples of java.io.LineNumberReader.readLine()


        } catch (Exception e) {
            throw DbException.convertToIOException(e);
        }
        PrintWriter writer = new PrintWriter(new BufferedWriter(w));
        while (true) {
            String line = r.readLine();
            if (line == null) {
                break;
            }
            if (!line.startsWith("#")) {
                writer.print(line + "\n");
View Full Code Here


            } else if (inType.equalsIgnoreCase("LatLon")) {
                outStr1.append("LatLonPoint to UTM\nLatitude   Longitude\t\tZone Easting Northing     \n");
                outStr2.append("LatLonPoint to MGRS\nLatitude   Longitude\t\tMGRS\n");
            }

            while ((record = lnr.readLine()) != null) {
                if (inType.equalsIgnoreCase("MGRS")) {
                    try {
                        MGRSPoint mgrsp = new MGRSPoint(record);
                        record.trim();
                        mgrsp.decode(record);
View Full Code Here

    System.out.println("Index: "+file.getPath());
    FileInputStream in = new FileInputStream(file);
    LineNumberReader reader = new LineNumberReader(new InputStreamReader(in));
    String line;
    for(;;) {
      line = reader.readLine();
      if (line == null) {
        break;
      }
      _symbols.put(line, new Integer(_count++));
      _set.add(line);
View Full Code Here

      SymbolTool n = new SymbolTool(dir);
      LineNumberReader reader =
        new LineNumberReader(new InputStreamReader(System.in));
      int count = 0;
      for(;;) {
        String line = reader.readLine();
        if (line == null) {
          break;
        }
        n.update(line.trim());
        count++;
View Full Code Here

        } catch (final Exception e) {
            logger.warning(settingsFile.getName() + " does not exist, will create it");
            return false;
        }
        try {
            while ((line = settingsReader.readLine()) != null) {
                line = line.trim();
                if (line.length() != 0 && line.startsWith("#") == false) {
                    final StringTokenizer strtok = new StringTokenizer(line, "=");
                    String key = "";
                    String value = "";
View Full Code Here

        while(true) {
          if (out.checkError()) {
            break;
          }
          out.print(prompt(_self));
          String line = reader.readLine();
          if (line == null) {
            break;
          }
          try {
            if (action(out, line)) {
View Full Code Here

      reader = new LineNumberReader(new StringReader(bshScript));
      int lineNumber = e.getErrorLineNumber();
     
      for(int i = 0; i < lineNumber; i++)
      {
        lineContent = reader.readLine();
      }
    }
    catch(IOException ioe)
    {
    }
View Full Code Here

    {
      FileInputStream fis = new FileInputStream("/Users/xgu/lucene29test/bbb");
      InputStreamReader isr = new InputStreamReader(fis);
      LineNumberReader reader = new LineNumberReader(isr);
      String line;
      while( (line=reader.readLine())!=null)
      {
        wordlist.add(line);
      }
      words = wordlist.toArray(new String[1]);
    } catch (Exception e)
View Full Code Here

    FileReader oReader = new FileReader(sFile);
    BufferedReader oBuffer = new BufferedReader(oReader);
    LineNumberReader oLines = new LineNumberReader(oBuffer);

    while ((sLine = oLines.readLine())!=null) {
      f = 0;
      s = -1;
      while ((s=sLine.indexOf(';',s+1))!=-1) {
        f++;
        switch (f) {
View Full Code Here

        isr = new InputStreamReader(ServerUtils.class.getResourceAsStream("/org/xsocket/connection/http/server/mime.types"));
        if (isr != null) {
          lnr = new LineNumberReader(isr);
          String line = null;
          do {
            line = lnr.readLine();
            if (line != null) {
              line = line.trim();
              if (!line.startsWith("#")) {
                StringTokenizer st = new StringTokenizer(line);
                if (st.hasMoreTokens()) {
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.