Package java.io

Examples of java.io.PrintWriter.format()


    for (Symbol symbol : symbols) {
      out.format("new Symbol(\"%s\", %s, %s, %s, %s, ", symbol.getName(),
          symbol.getInput(), symbol.getTag(), symbol.getOutput(),
          symbol.getSpace());
      out.format("%b, %b, %b, %b, ", symbol.isDefinition(), symbol
          .isUnderover(), symbol.isUnary(), symbol.isFunc());
      out.format("%b, %b, %b, %b, %b, %b, -1", symbol.isAcc(), symbol
          .isBinary(), symbol.isInfix(), symbol.isRightBracket(),
          symbol.isLeftBracket(), symbol.isInvisible());
      out.println("),");
View Full Code Here


      out.format("new Symbol(\"%s\", %s, %s, %s, %s, ", symbol.getName(),
          symbol.getInput(), symbol.getTag(), symbol.getOutput(),
          symbol.getSpace());
      out.format("%b, %b, %b, %b, ", symbol.isDefinition(), symbol
          .isUnderover(), symbol.isUnary(), symbol.isFunc());
      out.format("%b, %b, %b, %b, %b, %b, -1", symbol.isAcc(), symbol
          .isBinary(), symbol.isInfix(), symbol.isRightBracket(),
          symbol.isLeftBracket(), symbol.isInvisible());
      out.println("),");
    }
View Full Code Here

        {
            String path = library.toClientURL();

            paths.put(path);

            writer.format("\n/* %s */;\n", path);

            Resource resource = library.getResource();

            StreamableResource streamable = streamableResourceSource.getStreamableResource(resource,
                    StreamableResourceProcessing.FOR_AGGREGATION);
View Full Code Here

    else if (operator.equals("*"))
      result = arg1 * arg2;
    else if (operator.equals("/"))
      result = arg1 / arg2;
   
    out.format("{\"result\": %s}", result);
    out.flush();
  }
}
View Full Code Here

        if (!current) {
            rootcount = data.getShort(data.position() + 1) &0xffff;
            length -= (align(3 + rootcount * 3) + refids.length * 16);
        }

        writer.format(
                "Segment %s (%d bytes, %d ref%s, %d root%s)%n",
                uuid, length,
                refids.length, (refids.length != 1 ? "s" : ""),
                rootcount, (rootcount != 1 ? "s" : ""));
        writer.println("--------------------------------------------------------------------------");
View Full Code Here

                refids.length, (refids.length != 1 ? "s" : ""),
                rootcount, (rootcount != 1 ? "s" : ""));
        writer.println("--------------------------------------------------------------------------");
        if (refids.length > 0) {
            for (int i = 0; i < refids.length; i++) {
                writer.format("reference %02x: %s%n", i, refids[i]);
            }
            writer.println("--------------------------------------------------------------------------");
        }
        int pos = data.limit() - ((length + 15) & ~15);
        while (pos < data.limit()) {
View Full Code Here

            }
            writer.println("--------------------------------------------------------------------------");
        }
        int pos = data.limit() - ((length + 15) & ~15);
        while (pos < data.limit()) {
            writer.format("%04x: ", (MAX_SEGMENT_SIZE - data.limit() + pos) >> RECORD_ALIGN_BITS);
            for (int i = 0; i < 16; i++) {
                if (i > 0 && i % 4 == 0) {
                    writer.append(' ');
                }
                if (pos + i >= data.position()) {
View Full Code Here

                if (i > 0 && i % 4 == 0) {
                    writer.append(' ');
                }
                if (pos + i >= data.position()) {
                    byte b = data.get(pos + i);
                    writer.format("%02x ", b & 0xff);
                } else {
                    writer.append("   ");
                }
            }
            writer.append(' ');
View Full Code Here

    }

    public String toString() {
        StringWriter sw = new StringWriter();
        PrintWriter writer = new PrintWriter(sw);
        writer.format("[%s] %s %s", severity, message, resource);
        PrintUtil util = new PrintUtil(writer, false);
        if (model != null) {
            writer.println();
           // util.print(model);
        }
View Full Code Here

        return a.getName().compareTo(b.getName());
      }
    });

    if (!format.isJson()) {
      stdout.format("%-30s %-10s\n", "Name", "Version");
      stdout
          .print("----------------------------------------------------------------------\n");
    }

    for (Plugin p : plugins) {
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.