Package java.io

Examples of java.io.LineNumberReader.readLine()


    private void runFile(String fileName) throws IOException {
        LineNumberReader reader = new LineNumberReader(new BufferedReader(
                new InputStreamReader(IOUtils.openFileInputStream(fileName))));
        while (true) {
            String line = reader.readLine();
            if (line == null) {
                break;
            }
            runLine(line.trim());
        }
View Full Code Here


      StringBuffer helpHolder = new StringBuffer();
      LineNumberReader lnr = new LineNumberReader(new InputStreamReader(inR));

      String line;

      while ((line = lnr.readLine()) != null) {
        helpHolder.append(line+"\n");
      }

      lnr.close();
      final javax.swing.JFrame jf = new javax.swing.JFrame();
View Full Code Here

     * Usage: java ThreadDumpFilter <log.txt >threadDump.txt
     * @param a ignored
     */
    public static void main(String... a) throws Exception {
        LineNumberReader in = new LineNumberReader(new InputStreamReader(System.in));
        for (String s; (s = in.readLine()) != null;) {
            if (s.startsWith("Full thread")) {
                do {
                    System.out.println(s);
                    s = in.readLine();
                } while(s != null && (s.length() == 0 || " \t\"".indexOf(s.charAt(0)) >= 0));
View Full Code Here

        LineNumberReader in = new LineNumberReader(new InputStreamReader(System.in));
        for (String s; (s = in.readLine()) != null;) {
            if (s.startsWith("Full thread")) {
                do {
                    System.out.println(s);
                    s = in.readLine();
                } while(s != null && (s.length() == 0 || " \t\"".indexOf(s.charAt(0)) >= 0));
            }
        }
    }
}
View Full Code Here

    FileReader file = new FileReader(raProperties);
    LineNumberReader lnr = new LineNumberReader(file);

    // get RAR name
    String line = lnr.readLine();
    while (line != null) {
      if (line.startsWith("RAR_NAME"))
        break;
      line = lnr.readLine();
    }
View Full Code Here

    // get RAR name
    String line = lnr.readLine();
    while (line != null) {
      if (line.startsWith("RAR_NAME"))
        break;
      line = lnr.readLine();
    }
    int i = line.indexOf("RAR_NAME");
    String rarName = line.substring(i+"RAR_NAME".length()).trim();
    if (debug)
      System.out.println("RAConfig.updateRAR : rarName = " + rarName);
View Full Code Here

    // create Map of properties
    Map map = new Hashtable();
    Hashtable prop = null;
    String nodeName = null;
    line = lnr.readLine();
    while (line != null) {
      if (line.startsWith("[")) {
        prop = new Hashtable();
        nodeName = line.substring(line.indexOf("[")+1,line.indexOf("]"));
        map.put(nodeName.trim(),prop);
View Full Code Here

        StringTokenizer st = new StringTokenizer(line);
        if (st.countTokens() == 2 && prop != null) {
          prop.put(st.nextToken(),st.nextToken());
        }
      }
      line = lnr.readLine();
    }
    file.close();

    if (debug)
      System.out.println("RAConfig.updateRAR : map = " + map);
View Full Code Here

        File input = markerAnnotation.getMarker().getResource().getLocation().toFile();
       
        for (String encoding : encodingsToTest) {   
          read = new LineNumberReader(new InputStreamReader(new FileInputStream(input), encoding));
            String line;
            while ((line = read.readLine()) != null) {
              if (read.getLineNumber()-1 == linenumber) {
                break;
              }
            }
          if (line != null && !InvalidEncodingMarkingHandler.containsInvalidChar(line)) {
View Full Code Here

      String encoding = file.getCharset(true);
      LineNumberReader read = null;
      try {
        read = new LineNumberReader(new InputStreamReader(new FileInputStream(file.getLocation().toFile()), encoding));
            String line;
            while ((line = read.readLine()) != null) {
             
              boolean invalidCharsFound = false;
              Map<String,Object> attributes = new HashMap<String, Object>();
              List<Character> invalidCharsInLine = new ArrayList<Character>();
             
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.