Package java.io

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


      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

        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

      } 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

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

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

View Full Code Here

      buffOut.write(callData);
      // Writing an end of file sign on Unix systems
      if (Constants.LINE_SEPERATOR.equals("\n")
          && (callData.length() == 0 || callData.charAt(callData
              .length() - 1) != '\n'))
        buffOut.newLine();
      buffOut.close();
    }
    catch (IOException e)
    {
      throw new XException(Constants.LOCATION_EXTERN,
View Full Code Here

        buffOut.write(callData);
        // Writing an end of file sign on Unix systems
        if (Constants.LINE_SEPERATOR.equals("\n")
            && (callData.length() == 0 || callData.charAt(callData
                .length() - 1) != '\n'))
          buffOut.newLine();
        buffOut.close();
      }
      catch (IOException e)
      {
        throw new XException(Constants.LOCATION_EXTERN,
View Full Code Here

      try
      {
        for (int i = 0; i < internalCommands.size(); i++)
        {
          writer.write((String) internalCommands.get(i));
          writer.newLine();
        }
        writer.flush();
      }
      catch (IOException e)
      {
View Full Code Here

      // Writing an end of file sign on Unix systems
      if (Constants.LINE_SEPERATOR.equals("\n")
          && (lastRecord.length() == 0 || lastRecord
              .charAt(lastRecord.length() - 1) != '\n'))
        buffOut.newLine();
    }
    catch (Exception e)
    {
      throw new XException(Constants.LOCATION_EXTERN,
          Constants.LAYER_TECHNICAL,
View Full Code Here

                    BufferedWriter writer = new BufferedWriter(new FileWriter(outFile));
                    BufferedReader reader = new BufferedReader(new InputStreamReader(jin));
                    for (String s = reader.readLine(); s != null; s = reader.readLine()) {
                        writer.write(s);
                        writer.newLine();
                    }
                    writer.close();
                }
                outFile.setLastModified(entry.getTime());
            }
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.