Examples of readLine()


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

Examples of java.io.RandomAccessFile.readLine()

    public LinkFile(File linkFile) throws IOException {
      RandomAccessFile read = new RandomAccessFile(linkFile,"r");

      String line = null;

      while((line = read.readLine()) != null) {
        if(line.startsWith("URL")) {
          mTarget = line.substring(line.indexOf(":/")+2);
        }
      }
View Full Code Here

Examples of java.net.URL.readLine()

                        try {
                            // is this designated for interception purpose? If so, don't load them in the MavenEmbedder
                            // earlier I tried to use a marker file in the same directory, but that won't work
                            r = new BufferedReader(new InputStreamReader(url.openStream()));
                            for (int i=0; i<2; i++) {
                                String l = r.readLine();
                                if(l!=null && l.contains("MAVEN-INTERCEPTION-TO-BE-MASKED"))
                                    return true;
                            }
                        } catch (IOException _) {
                            // let whoever requesting this resource re-discover an error and report it
View Full Code Here

Examples of javax.imageio.stream.ImageInputStream.readLine()

          };

        bs = new ByteArrayInputStream(b);
        i = new MemoryCacheImageInputStream(bs);

        h.check(i.readLine().equals("GNU"));
        h.check(i.readLine().equals("Classpath"));
        h.check(i.readLine().equals("Rulez"));
        h.check(i.readLine().equals("Dudez!"));
        h.check(i.readLine() == null);
View Full Code Here

Examples of javax.imageio.stream.MemoryCacheImageInputStream.readLine()

          };

        bs = new ByteArrayInputStream(b);
        i = new MemoryCacheImageInputStream(bs);

        h.check(i.readLine().equals("GNU"));
        h.check(i.readLine().equals("Classpath"));
        h.check(i.readLine().equals("Rulez"));
        h.check(i.readLine().equals("Dudez!"));
        h.check(i.readLine() == null);
View Full Code Here

Examples of javax.servlet.ServletInputStream.readLine()

    @Override
    protected JsonBean getJob(HttpServletRequest request, HttpServletResponse response) throws XServletException,
            IOException, BaseEngineException {
        ServletInputStream is = request.getInputStream();
        byte[] b = new byte[101];
        while (is.readLine(b, 0, 100) != -1) {
            XLog.getLog(getClass()).warn("Printing :" + new String(b));
        }

        JsonBean jobBean = null;
        String jobId = getResourceName(request);
View Full Code Here

Examples of jline.ConsoleReader.readLine()

    private String readPassword(String prompt) {
        ConsoleReader reader;
        try {
            reader = new ConsoleReader();
            Character mask = 0;
            return reader.readLine(prompt, mask);
        } catch (IOException ignored) {
        }
        return null;
    }
}
View Full Code Here

Examples of jline.console.ConsoleReader.readLine()

    out.println(banner());

    Environment env = new Environment();

    while (!env.isHalted()) {
      String line = reader.readLine();
      if (line == null)
        break;

      String output = eval(env, line);
View Full Code Here

Examples of jmt.engine.dataAnalysis.measureOutputs.VerboseCSVMeasureOutputReader.readLine()

    updateProgress(0.0);
    reader.openFile(start > 1 ? start : 1);
    try {
      long lastUpdateTime = System.currentTimeMillis();
      while(reader.hasMoreLines()) {
        reader.readLine();
        statistics.putNewSample(reader.getParsedSample(), reader.getParsedWeight());
        // Fills distribution if present
        if (dist != null) {
          dist.addSample(reader.getParsedSample(), reader.getParsedWeight());
        }
View Full Code Here

Examples of joshua.util.io.LineReader.readLine()

    try {
     
      LineReader reader = new LineReader(file);
      HashMap<String, Double> res =new HashMap<String, Double>();
      while(reader.hasNext()){
        String line = reader.readLine();
        String[] fds = line.split("\\s+\\|{3}\\s+");// feature_key ||| feature vale; the feature_key itself may contain "|||"
        StringBuffer featKey = new StringBuffer();
        for(int i=0; i<fds.length-1; i++){
          featKey.append(fds[i]);
          if(this.useIntegerNgram){
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.