pbwest      2004/01/19 23:13:56

  Modified:    src/java/org/apache/fop/xml Tag: FOP_0-20-0_Alt-Design
                        ArrayXmlEventsBuffer.java
  Log:
  Add emptyBuffer() method
  
  Revision  Changes    Path
  No                   revision
  No                   revision
  1.1.2.3   +11 -9     
xml-fop/src/java/org/apache/fop/xml/Attic/ArrayXmlEventsBuffer.java
  
  Index: ArrayXmlEventsBuffer.java
  ===================================================================
  RCS file: 
/home/cvs/xml-fop/src/java/org/apache/fop/xml/Attic/ArrayXmlEventsBuffer.java,v
  retrieving revision 1.1.2.2
  retrieving revision 1.1.2.3
  diff -u -r1.1.2.2 -r1.1.2.3
  --- ArrayXmlEventsBuffer.java 20 Jan 2004 05:45:54 -0000      1.1.2.2
  +++ ArrayXmlEventsBuffer.java 20 Jan 2004 07:13:55 -0000      1.1.2.3
  @@ -70,13 +70,6 @@
   implements XmlEventSource {
   
       /**
  -     * Constant for <i>discardEvent</i> field of
  -     * <i>getEndElement(boolean discardEvent, XmlEvent(, boolean)).
  -     */
  -    public static final boolean DISCARD_EV = true,
  -                                 RETAIN_EV = false;
  -
  -    /**
        * The datastructure for the events buffer.
        */
       private ArrayList buffer;
  @@ -185,4 +178,13 @@
           // requirement, set bufferRead to false.
           nextEvent = 0;
       }
  +    
  +    public void emptyBuffer() {
  +        rewindBuffer();
  +        for (int i = buffer.size(); i >= 0; ) {
  +            namespaces.relinquishEvent((XmlEvent)buffer.get(--i));
  +            buffer.remove(i);
  +        }
  +    }
  +    
   }
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to