Code example for DefaultHandler

0
    public ContentHandler getNewContentHandler() { 
 
        if (type == HANDLER_TYPE.BODY) { 
            return new BodyContentHandler(writeLimit); 
        } else if (type == HANDLER_TYPE.IGNORE) { 
            return new DefaultHandler(); 
        } 
        if (writeLimit > -1) { 
            switch(type) { 
                case TEXT: 
                    return new WriteOutContentHandler(new ToTextContentHandler(), writeLimit); 
                case HTML: 
                    return new WriteOutContentHandler(new ToHTMLContentHandler(), writeLimit); 
                case XML: 
                    return new WriteOutContentHandler(new ToXMLContentHandler(), writeLimit); 
                default: 
                    return new WriteOutContentHandler(new ToTextContentHandler(), writeLimit); 
            } 
        } else { 
            switch (type) {