You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@xerces.apache.org by el...@apache.org on 2001/03/15 22:01:36 UTC

cvs commit: xml-xerces/java/src/org/apache/xml/serialize Printer.java

elena       01/03/15 13:01:35

  Modified:    java/src/org/apache/xml/serialize Printer.java
  Log:
  Applied patch from Sandy Gao: implement the function "flushLine()". Bug fix:
  http://nagoya.apache.org/bugzilla/show_bug.cgi?id=966
  
  Revision  Changes    Path
  1.4       +11 -2     xml-xerces/java/src/org/apache/xml/serialize/Printer.java
  
  Index: Printer.java
  ===================================================================
  RCS file: /home/cvs/xml-xerces/java/src/org/apache/xml/serialize/Printer.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- Printer.java	2000/08/30 18:59:21	1.3
  +++ Printer.java	2001/03/15 21:01:34	1.4
  @@ -70,7 +70,7 @@
    * {@link IndentPrinter} supports indentation and line wrapping by
    * extending this class.
    *
  - * @version $Revision: 1.3 $ $Date: 2000/08/30 18:59:21 $
  + * @version $Revision: 1.4 $ $Date: 2001/03/15 21:01:34 $
    * @author <a href="mailto:arkin@intalio.com">Assaf Arkin</a>
    */
   public class Printer
  @@ -313,7 +313,16 @@
   
       public void flushLine( boolean preserveSpace )
       {
  -        // NOOP
  +        // Write anything left in the buffer into the writer.
  +        try {
  +            _writer.write( _buffer, 0, _pos );
  +        } catch ( IOException except ) {
  +            // We don't throw an exception, but hold it
  +            // until the end of the document.
  +            if ( _exception == null )
  +                _exception = except;
  +        }
  +        _pos = 0;
       }
       
       
  
  
  

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