Examples of newLine()


Examples of java.io.BufferedWriter.newLine()

    BufferedWriter writer = new BufferedWriter(new OutputStreamWriter(output, "ISO-8859-1"));
    final String CATALOG_FILE_HEADER = "#\n# "
        + DefaultFurnitureCatalog.PLUGIN_FURNITURE_CATALOG_FAMILY + ".properties %tc\n"
        + "# Generated by Furniture Library Editor\n#\n";
    writer.write(String.format(CATALOG_FILE_HEADER, new Date()));
    writer.newLine();
    writeProperty(writer, DESCRIPTION, furnitureLibrary.getDescription());
    writeProperty(writer, VERSION, furnitureLibrary.getVersion());
    writeProperty(writer, LICENSE, furnitureLibrary.getLicense());
    writeProperty(writer, PROVIDER, furnitureLibrary.getProvider());
   
View Full Code Here

Examples of java.io.BufferedWriter.newLine()

    writeProperty(writer, LICENSE, furnitureLibrary.getLicense());
    writeProperty(writer, PROVIDER, furnitureLibrary.getProvider());
   
    int i = 1;
    for (CatalogPieceOfFurniture piece : furnitureLibrary.getFurniture()) {
      writer.newLine();
      writeProperty(writer, DefaultFurnitureCatalog.PropertyKey.ID, i, piece.getId());
      writeProperty(writer, DefaultFurnitureCatalog.PropertyKey.NAME, i, piece.getName());
      writeProperty(writer, DefaultFurnitureCatalog.PropertyKey.DESCRIPTION, i, piece.getDescription());
      writeProperty(writer, DefaultFurnitureCatalog.PropertyKey.CATEGORY, i, piece.getCategory().getName());
      Content pieceModel = piece.getModel();
View Full Code Here

Examples of java.io.BufferedWriter.newLine()

        + DefaultFurnitureCatalog.PLUGIN_FURNITURE_CATALOG_FAMILY + "_" + language + ".properties %tc\n"
        + "# Generated by Furniture Library Editor\n#\n";
    writer.write(String.format(CATALOG_FILE_HEADER, new Date()));
    int i = 1;
    for (CatalogPieceOfFurniture piece : furnitureLibrary.getFurniture()) {
      writer.newLine();
      Object pieceName = furnitureLibrary.getPieceOfFurnitureLocalizedData(
          piece, language, FurnitureLibrary.FURNITURE_NAME_PROPERTY);
      if (pieceName != null) {
        writeProperty(writer, DefaultFurnitureCatalog.PropertyKey.NAME, i, pieceName);
      }
View Full Code Here

Examples of java.io.BufferedWriter.newLine()

        String musicString = getMusicString();
        while (musicString.length() > 0) {
            if ((musicString.length() > 80) && (musicString.indexOf(' ', 80) > -1)) {
                int indexOf80ColumnSpace = musicString.indexOf(' ', 80);
                out.write(musicString.substring(0, indexOf80ColumnSpace));
                out.newLine();
                musicString = musicString.substring(indexOf80ColumnSpace, musicString.length());
            } else {
                out.write(musicString);
                musicString = "";
            }
View Full Code Here

Examples of java.io.BufferedWriter.newLine()

    protected void printPage(byte[] page, int pg, String fname) {

        try {
            BufferedWriter ow = new BufferedWriter(new PrintWriter(new FileOutputStream(fname, true)), page.length);
            ow.write(" txnID=" + Integer.toHexString(txnId) + " type=" + types[type]);
            ow.newLine();
            String s = ByteTool.toHexString(0, page, 0, page.length);
            ow.write(s, 0, s.length());
            ow.newLine();
            ow.flush();
            ow.close();
View Full Code Here

Examples of java.io.BufferedWriter.newLine()

            BufferedWriter ow = new BufferedWriter(new PrintWriter(new FileOutputStream(fname, true)), page.length);
            ow.write(" txnID=" + Integer.toHexString(txnId) + " type=" + types[type]);
            ow.newLine();
            String s = ByteTool.toHexString(0, page, 0, page.length);
            ow.write(s, 0, s.length());
            ow.newLine();
            ow.flush();
            ow.close();

        } catch (Exception e) {
            logger.debug(e);
View Full Code Here

Examples of java.io.BufferedWriter.newLine()

      Info info = (Info) _infoList.get(i);

      if (info._type == Info.COMMENT) {
        // Add a comment line
        awriter.write(info._value);
        awriter.newLine();

      } else if (info._type == Info.EMPTY_LINE) {
        // Add a empty line
        awriter.newLine();
      } else if (info._type == Info.MASTER_LINE) {
View Full Code Here

Examples of java.io.BufferedWriter.newLine()

        awriter.write(info._value);
        awriter.newLine();

      } else if (info._type == Info.EMPTY_LINE) {
        // Add a empty line
        awriter.newLine();
      } else if (info._type == Info.MASTER_LINE) {
                awriter.write(Info.IMPORT_FILE_PREFIX+ " "+info._value);
                awriter.newLine();
            } else {
        // Add a property (key + value) line
View Full Code Here

Examples of java.io.BufferedWriter.newLine()

      } else if (info._type == Info.EMPTY_LINE) {
        // Add a empty line
        awriter.newLine();
      } else if (info._type == Info.MASTER_LINE) {
                awriter.write(Info.IMPORT_FILE_PREFIX+ " "+info._value);
                awriter.newLine();
            } else {
        // Add a property (key + value) line
        String key = info._value;

        String val = (String) get(key);
View Full Code Here

Examples of java.io.BufferedWriter.newLine()

         * hence pass false to flag.
         */
        val = saveConvert(val, false);

        awriter.write(key + "=" + val);
        awriter.newLine();
      }
    }
    awriter.flush();
  }

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.