Code example for PrintWriter

Methods: printf

     * Represents all the fields in a HostPatch 
    public static class Record implements Types.Record { 
        public String toString() {
            StringWriter writer = new StringWriter();
            PrintWriter print = new PrintWriter(writer);
            print.printf("%1$20s: %2$s\n", "uuid", this.uuid);
            print.printf("%1$20s: %2$s\n", "nameLabel", this.nameLabel);
            print.printf("%1$20s: %2$s\n", "nameDescription", this.nameDescription);
            print.printf("%1$20s: %2$s\n", "version", this.version);
            print.printf("%1$20s: %2$s\n", "host",;
            print.printf("%1$20s: %2$s\n", "applied", this.applied);
            print.printf("%1$20s: %2$s\n", "timestampApplied", this.timestampApplied);
            print.printf("%1$20s: %2$s\n", "size", this.size);
            print.printf("%1$20s: %2$s\n", "poolPatch", this.poolPatch);
            print.printf("%1$20s: %2$s\n", "otherConfig", this.otherConfig);
            return writer.toString();
         * Convert a host_patch.Record to a Map