Example usage for org.apache.commons.collections Buffer clear

List of usage examples for org.apache.commons.collections Buffer clear

Introduction

In this page you can find the example usage for org.apache.commons.collections Buffer clear.

Prototype

void clear();

Source Link

Document

Removes all of the elements from this collection (optional operation).

Usage

From source file:org.apache.juddi.servlets.NotifyServlet.java

@SuppressWarnings("unchecked")
public void doGet(HttpServletRequest request, HttpServletResponse response)
        throws ServletException, IOException {
    StringBuffer sb = new StringBuffer();

    Buffer nl = NotificationList.getInstance().getNotifications();
    Iterator<String> it = nl.iterator();
    while (it.hasNext()) {
        String notification = (String) it.next();
        sb.append(notification);/*from   w w  w.  j  a  v a  2 s.c  o  m*/
    }
    nl.clear();
    PrintWriter out = response.getWriter();
    out.println(sb.toString());
}