[prev in list] [next in list] [prev in thread] [next in thread] 

List:       xalan-cvs
Subject:    cvs commit: xml-xalan/java/src/org/apache/xml/serializer ToStream.java
From:       minchau () apache ! org
Date:       2005-09-08 19:43:40
Message-ID: 20050908194340.40922.qmail () minotaur ! apache ! org
[Download RAW message or body]

minchau     2005/09/08 12:43:40

  Modified:    java/src/org/apache/xml/serializer ToStream.java
  Log:
  Just moving some code into a utility method, to set the EOL
  separator (a char array) and at the same time update
  the lenght of the array (just so we don't forget).
  
  Revision  Changes    Path
  1.46      +13 -5     xml-xalan/java/src/org/apache/xml/serializer/ToStream.java
  
  Index: ToStream.java
  ===================================================================
  RCS file: /home/cvs/xml-xalan/java/src/org/apache/xml/serializer/ToStream.java,v
  retrieving revision 1.45
  retrieving revision 1.46
  diff -u -r1.45 -r1.46
  --- ToStream.java	4 Aug 2005 23:57:06 -0000	1.45
  +++ ToStream.java	8 Sep 2005 19:43:40 -0000	1.46
  @@ -1,5 +1,5 @@
   /*
  - * Copyright 2001-2004 The Apache Software Foundation.
  + * Copyright 2001-2005 The Apache Software Foundation.
    *
    * Licensed under the Apache License, Version 2.0 (the "License");
    * you may not use this file except in compliance with the License.
  @@ -445,8 +445,7 @@
               String sep = 
                       format.getProperty(OutputPropertiesFactory.S_KEY_LINE_SEPARATOR);
               if (sep != null) {
  -                m_lineSep = sep.toCharArray();
  -                m_lineSepLen = sep.length();
  +            	this.setNewLine(sep.toCharArray());
               }
           }
   
  @@ -3319,4 +3318,13 @@
       public void setDTDEntityExpansion(boolean expand) { 
           m_expandDTDEntities = expand;     
       }
  -}
  \ No newline at end of file
  +        
  +    /**
  +     * Sets the end of line characters to be used during serialization
  +     * @param eolChars A character array corresponding to the characters to be used.
  +     */    
  +    public void setNewLine (char[] eolChars) {
  +        m_lineSep = eolChars;
  +        m_lineSepLen = eolChars.length;
  +    }
  +}
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: xalan-cvs-unsubscribe@xml.apache.org
For additional commands, e-mail: xalan-cvs-help@xml.apache.org

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic