SAP NetWeaver '04

com.sapportals.wcm.util.html
Class HTMLStreamWriter

[contained in: com.sap.netweaver.bc.util.par - bc.util.public_api.jar]
java.lang.Object
  |
  +--com.sapportals.wcm.util.html.HTMLStreamWriter
All Implemented Interfaces:
IHTMLContentHandler

public class HTMLStreamWriter
extends java.lang.Object
implements IHTMLContentHandler

Writes events from a IHTMLReader onto a stream.

A HTMLStreamWriter can be installed as a IHTMLContentHandler in a reader and will write all events generated by the reader onto the given stream.

Copyright (c) SAP AG 2001-2003


Constructor Summary
HTMLStreamWriter(java.io.OutputStream out)
          Will write all events onto out using the default Java encoding.
HTMLStreamWriter(java.io.OutputStream out, java.lang.String encoding)
          Will write all events onto out using the given Java encoding.
HTMLStreamWriter(java.io.Writer out)
          Will write all events onto out .
 
Method Summary
 void characters(char[] ch, int start, int length)
          Notification of a character event.
 void endDocument()
          Notification that the document is finished.
 void endElement(IHTMLElement element)
          Notification that an end tag was encountered (e.g. starting with '</').
 void startDocument()
          Notification that the document is about to start.
 void startElement(IHTMLElementStart element)
          Notification that a tag was encountered.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HTMLStreamWriter

public HTMLStreamWriter(java.io.OutputStream out)
Will write all events onto out using the default Java encoding.
Parameters:
out - the stream to write on

HTMLStreamWriter

public HTMLStreamWriter(java.io.OutputStream out,
                        java.lang.String encoding)
                 throws java.io.UnsupportedEncodingException
Will write all events onto out using the given Java encoding.
Parameters:
out - the stream to write on
encoding - to use
Throws:
java.io.UnsupportedEncodingException - Exception raised in failure situation

HTMLStreamWriter

public HTMLStreamWriter(java.io.Writer out)
Will write all events onto out . Encoding does not matter.
Parameters:
out - the Writer to write on
Method Detail

characters

public void characters(char[] ch,
                       int start,
                       int length)
                throws HTMLException
Description copied from interface: IHTMLContentHandler
Notification of a character event. The characters of the event are found in ch at offset start . There are length number of characters.

The content of the buffer before start or after start + length is undefined. Modification of the character array is strictly forbidden. The content of the array is undefined after this method returns.

Specified by:
characters in interface IHTMLContentHandler
Following copied from interface: com.sapportals.wcm.util.html.IHTMLContentHandler
Parameters:
ch - array holding characters of event
start - where in the array the characters begin
length - number of characters in event
Throws:
HTMLException - to indicate error in event handling

endDocument

public void endDocument()
                 throws HTMLException
Description copied from interface: IHTMLContentHandler
Notification that the document is finished.
Specified by:
endDocument in interface IHTMLContentHandler
Following copied from interface: com.sapportals.wcm.util.html.IHTMLContentHandler
Throws:
HTMLException - to indicate error in event handling

endElement

public void endElement(IHTMLElement element)
                throws HTMLException
Description copied from interface: IHTMLContentHandler
Notification that an end tag was encountered (e.g. starting with '</'). The element paramter is only valid for the duration of the call. The content of element are undefined when the method returns. See IHTMLElement for further information.
Specified by:
endElement in interface IHTMLContentHandler
Following copied from interface: com.sapportals.wcm.util.html.IHTMLContentHandler
Parameters:
element - TBD: Description of the incoming method parameter
Throws:
HTMLException - to indicate error in event handling

startDocument

public void startDocument()
                   throws HTMLException
Description copied from interface: IHTMLContentHandler
Notification that the document is about to start.
Specified by:
startDocument in interface IHTMLContentHandler
Following copied from interface: com.sapportals.wcm.util.html.IHTMLContentHandler
Throws:
HTMLException - to indicate error in event handling

startElement

public void startElement(IHTMLElementStart element)
                  throws HTMLException
Description copied from interface: IHTMLContentHandler
Notification that a tag was encountered. The element paramter is only valid for the duration of the call. The content of element are undefined when the method returns. See IHTMLElementStart for further information.
Specified by:
startElement in interface IHTMLContentHandler
Following copied from interface: com.sapportals.wcm.util.html.IHTMLContentHandler
Parameters:
element - TBD: Description of the incoming method parameter
Throws:
HTMLException - to indicate error in event handling

SAP NetWeaver '04

Copyright © 2004 by SAP AG. All Rights Reserved.
SAP, R/3, mySAP, mySAP.com, xApps, xApp, SAP NetWeaver, and other SAP products and services mentioned herein as well as their respective logos are trademarks or registered trademarks of SAP AG in Germany and in several other countries all over the world. All other product and service names mentioned are the trademarks of their respective companies. Data contained in this document serves informational purposes only. National product specifications may vary.

These materials are subject to change without notice. These materials are provided by SAP AG and its affiliated companies ("SAP Group") for informational purposes only, without representation or warranty of any kind, and SAP Group shall not be liable for errors or omissions with respect to the materials. The only warranties for SAP Group products and services are those that are set forth in the express warranty statements accompanying such products and services, if any. Nothing herein should be construed as constituting an additional warranty.