Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.crosswire.common.xml
Class SerializingContentHandler

    java.lang.Object
      org.crosswire.common.xml.SerializingContentHandler

All Implemented Interfaces:
  ContentHandler

    public class SerializingContentHandler

extends Object
implements ContentHandler

Class to convert a SAX stream into a simple String.

Distribution Licence: JSword is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License, version 2 as published by the Free Software Foundation. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. The License is available on the internet here, or by writing to: Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA The copyright to this program is held by it's authors.

Version:
  $Id: SerializingContentHandler.java,v 1.3 2004/11/28 21:36:31 joe Exp $
Author:
  Joe Walker [joe at eireneh dot com]
See Also:
  `Licence`

Field Summary
`private StringBuffer` | `buffer`
`private boolean` | `newlines`

Constructor Summary
`SerializingContentHandler()` Default ctor that does not insert newlines.
`SerializingContentHandler(boolean newlines)` Default ctor that does not insert newlines.

Method Summary
`void` | `characters(char[] chars, int start, int length)`
`void` | `endDocument()`
`void` | `endElement(String uri, String localname, String qname)`
`void` | `endPrefixMapping(String prefix)`
`void` | `ignorableWhitespace(char[] chars, int start, int length)`
`void` | `processingInstruction(String target, String data)`
`void` | `setDocumentLocator(Locator locator)`
`void` | `skippedEntity(String name)`
`void` | `startDocument()`
`void` | `startElement(String uri, String localname, String qname, Attributes attrs)`
`void` | `startPrefixMapping(String prefix, String uri)`
`String` | `toString()`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

Field Detail

### newlines

    private boolean newlines

### buffer

    private StringBuffer buffer

Constructor Detail

### SerializingContentHandler

    public SerializingContentHandler()

  Default ctor that does not insert newlines.

### SerializingContentHandler

    public SerializingContentHandler(boolean newlines)

  Default ctor that does not insert newlines.

Method Detail

### toString

    public String toString()

  Overrides:
    `toString` in class `Object`

### setDocumentLocator

    public void setDocumentLocator(Locator locator)

  Specified by:
    `setDocumentLocator` in interface `ContentHandler`

### startDocument

    public void startDocument()

  Specified by:
    `startDocument` in interface `ContentHandler`

### endDocument

    public void endDocument()

  Specified by:
    `endDocument` in interface `ContentHandler`

### startPrefixMapping

    public void startPrefixMapping(String prefix,
                                   String uri)

  Specified by:
    `startPrefixMapping` in interface `ContentHandler`

### endPrefixMapping

    public void endPrefixMapping(String prefix)

  Specified by:
    `endPrefixMapping` in interface `ContentHandler`

### startElement

    public void startElement(String uri,
                             String localname,
                             String qname,
                             Attributes attrs)

  Specified by:
    `startElement` in interface `ContentHandler`

### endElement

    public void endElement(String uri,
                           String localname,
                           String qname)

  Specified by:
    `endElement` in interface `ContentHandler`

### characters

    public void characters(char[] chars,
                           int start,
                           int length)

  Specified by:
    `characters` in interface `ContentHandler`

### ignorableWhitespace

    public void ignorableWhitespace(char[] chars,
                                    int start,
                                    int length)

  Specified by:
    `ignorableWhitespace` in interface `ContentHandler`

### processingInstruction

    public void processingInstruction(String target,
                                      String data)

  Specified by:
    `processingInstruction` in interface `ContentHandler`

### skippedEntity

    public void skippedEntity(String name)

  Specified by:
    `skippedEntity` in interface `ContentHandler`

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| Copyright ? 2003-2004
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD