Examples of printf()


Examples of java.io.PrintWriter.printf()

            pw.printf("<td>%s</td>%n", session.getSessionId());
            pw.printf("<td>%s</td>%n", session.getUser().getName());
            pw.printf("<td>%s:%s</td>%n", session.getClientAddress().getAddress().getHostAddress(),
                session.getClientAddress().getPort());
            pw.printf("<td>%1$tF %1$tT</td>%n", session.getConnectionTime());
            pw.printf("<td>%1$tF %1$tT</td>%n", session.getLoginTime());
            pw.printf("<td>%1$tF %1$tT</td>%n", session.getLastAccessTime());
            pw.printf("<td>%d</td>%n", session.getMaxIdleTime());
            pw.println("</tr>");

            if (entry.getRequestLine() != null) {
View Full Code Here

Examples of java.io.PrintWriter.printf()

            pw.printf("<td>%s</td>%n", session.getUser().getName());
            pw.printf("<td>%s:%s</td>%n", session.getClientAddress().getAddress().getHostAddress(),
                session.getClientAddress().getPort());
            pw.printf("<td>%1$tF %1$tT</td>%n", session.getConnectionTime());
            pw.printf("<td>%1$tF %1$tT</td>%n", session.getLoginTime());
            pw.printf("<td>%1$tF %1$tT</td>%n", session.getLastAccessTime());
            pw.printf("<td>%d</td>%n", session.getMaxIdleTime());
            pw.println("</tr>");

            if (entry.getRequestLine() != null) {
                pw.println("<tr>");
View Full Code Here

Examples of java.io.PrintWriter.printf()

            pw.printf("<td>%s:%s</td>%n", session.getClientAddress().getAddress().getHostAddress(),
                session.getClientAddress().getPort());
            pw.printf("<td>%1$tF %1$tT</td>%n", session.getConnectionTime());
            pw.printf("<td>%1$tF %1$tT</td>%n", session.getLoginTime());
            pw.printf("<td>%1$tF %1$tT</td>%n", session.getLastAccessTime());
            pw.printf("<td>%d</td>%n", session.getMaxIdleTime());
            pw.println("</tr>");

            if (entry.getRequestLine() != null) {
                pw.println("<tr>");
                pw.printf("<td>&nbsp;</td>%n");
View Full Code Here

Examples of java.io.PrintWriter.printf()

            pw.printf("<td>%d</td>%n", session.getMaxIdleTime());
            pw.println("</tr>");

            if (entry.getRequestLine() != null) {
                pw.println("<tr>");
                pw.printf("<td>&nbsp;</td>%n");
                pw.printf("<td colspan='6'>%s</td>%n", entry.getRequestLine());
                pw.println("</tr>");
            }
        }
        pw.println("</table>");
View Full Code Here

Examples of java.io.PrintWriter.printf()

            pw.println("</tr>");

            if (entry.getRequestLine() != null) {
                pw.println("<tr>");
                pw.printf("<td>&nbsp;</td>%n");
                pw.printf("<td colspan='6'>%s</td>%n", entry.getRequestLine());
                pw.println("</tr>");
            }
        }
        pw.println("</table>");
    }
View Full Code Here

Examples of java.io.PrintWriter.printf()

                    w.println("Flushing output<br/>");
                    w.flush();
                }
               
                final String msg = String.format("Cycle %d of %d", i, cycles);
                w.printf(msg);
                w.print("\n<br/>");
               
                if(runtimeState != null) {
                    runtimeState.setProgressMessage(msg);
                    final int remainingCycles = cycles - i;
View Full Code Here

Examples of java.io.PrintWriter.printf()

            for (String line = null; (line = br.readLine()) != null; ) {
                String[] rowColEntry = line.split("\\s+");
                int row = Integer.parseInt(rowColEntry[0]);
                int col = Integer.parseInt(rowColEntry[1]);
                double value = Double.parseDouble(rowColEntry[2]);
                writer.printf("%d %d %f\n", row, col,
                              transform.transform(row-1, col-1, value));
            }
            writer.close();

            return outputFile;
View Full Code Here

Examples of java.io.PrintWriter.printf()

            String[] rowCol = line.split("\\s+");
            int numRows = Integer.parseInt(rowCol[0]);
            int numCols = Integer.parseInt(rowCol[1]);

            // Write out the header for the matrix.
            writer.printf("%d %d\n", numRows, numCols);

            // Traverse each row.
            for (int row = 0; (line = br.readLine()) != null &&
                              row < numRows; ++row) {
                // Traverse each entry in the matrix and transform the value for
View Full Code Here

Examples of java.io.PrintWriter.printf()

            int numRows = Integer.parseInt(rowColNonZeroCount[0]);
            int numCols = Integer.parseInt(rowColNonZeroCount[1]);
            int numTotalNonZeros = Integer.parseInt(rowColNonZeroCount[2]);

            // Write out the header for the new matrix file.
            writer.printf("%d %d %d\n", numRows, numCols, numTotalNonZeros);

            line = br.readLine();
            // Traverse each column in the matrix.
            for (int col = 0; line != null && col < numCols; ++col) {
                int numNonZeros = Integer.parseInt(line);
View Full Code Here

Examples of net.fec.openrq.util.io.printing.appendable.PrintableAppendable.printf()

        final int R = matrix.rows();
        final int C = matrix.columns();

        // this prints a line with column indexes and a line for each row preceded by a row index
        // (this only works fine for indices less than 100)
        output.printf("   ");
        for (int j = 0; j < C; j++)
            output.printf("* %02d ", j);

        output.println('|');

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.