org.marre.wap.wbxml
Class WbxmlWriter

java.lang.Object
  extended byorg.marre.wap.wbxml.WbxmlWriter
All Implemented Interfaces:
XmlWriter

public class WbxmlWriter
extends java.lang.Object
implements XmlWriter


Constructor Summary
WbxmlWriter(java.io.OutputStream os)
           
WbxmlWriter(java.io.OutputStream os, java.lang.String[] theTagTokens, java.lang.String[] theAttrStrartTokens, java.lang.String[] theAttrValueTokens)
           
 
Method Summary
 void addCharacters(char[] ch, int start, int length)
          Adds a segment of text.
 void addCharacters(java.lang.String str)
          Adds a segment of text.
 void addEmptyElement(java.lang.String tag)
          Adds an empty element tag.
 void addEmptyElement(java.lang.String tag, XmlAttribute[] attribs)
          Adds an empty start element tag with attributes.
 void addEndElement()
          Adds an end element tag.
 void addOpaqueData(byte[] buff)
           
 void addOpaqueData(byte[] buff, int off, int len)
           
 void addStartElement(java.lang.String tag)
          Adds a start element tag.
 void addStartElement(java.lang.String tag, XmlAttribute[] attribs)
          Adds a start element tag with attributes.
 void flush()
          Writes the wbxml to stream.
 void setAttrStartTokens(java.lang.String[] theAttrStrartTokens)
          Sets the attribute start tokens.
 void setAttrValueTokens(java.lang.String[] theAttrValueTokens)
          Sets the attribute value tokens.
 void setDoctype(java.lang.String publicID)
          Sets a public ID doctype.
 void setDoctype(java.lang.String name, java.lang.String systemURI)
          Sets a system URI doctype.
 void setDoctype(java.lang.String name, java.lang.String publicID, java.lang.String publicURI)
          Sets a public ID doctype.
 void setTagTokens(java.lang.String[] theTagTokens)
          Sets the tag tokens.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

WbxmlWriter

public WbxmlWriter(java.io.OutputStream os,
                   java.lang.String[] theTagTokens,
                   java.lang.String[] theAttrStrartTokens,
                   java.lang.String[] theAttrValueTokens)

WbxmlWriter

public WbxmlWriter(java.io.OutputStream os)
Method Detail

flush

public void flush()
           throws java.io.IOException
Writes the wbxml to stream.

Specified by:
flush in interface XmlWriter
Throws:
java.io.IOException

setDoctype

public void setDoctype(java.lang.String name,
                       java.lang.String systemURI)
Description copied from interface: XmlWriter
Sets a system URI doctype. Must be set before any of the add or flush methods.

Specified by:
setDoctype in interface XmlWriter
Parameters:
name - Name
systemURI - System URI

setDoctype

public void setDoctype(java.lang.String name,
                       java.lang.String publicID,
                       java.lang.String publicURI)
Description copied from interface: XmlWriter
Sets a public ID doctype. Must be set before any of the add or flush methods.

Specified by:
setDoctype in interface XmlWriter
Parameters:
name - Name
publicID - PublicID
publicURI - PublicURI

setDoctype

public void setDoctype(java.lang.String publicID)
Description copied from interface: XmlWriter
Sets a public ID doctype. Must be set before any of the add or flush methods.

Specified by:
setDoctype in interface XmlWriter
Parameters:
publicID - XML public ID

addStartElement

public void addStartElement(java.lang.String tag)
                     throws java.io.IOException
Description copied from interface: XmlWriter
Adds a start element tag. Ex: <TAG>

Specified by:
addStartElement in interface XmlWriter
Parameters:
tag - tag
Throws:
java.io.IOException - io error

addStartElement

public void addStartElement(java.lang.String tag,
                            XmlAttribute[] attribs)
                     throws java.io.IOException
Description copied from interface: XmlWriter
Adds a start element tag with attributes. Ex: <TAG attrib="value">

Specified by:
addStartElement in interface XmlWriter
Parameters:
tag - Tag
attribs - Attributes
Throws:
java.io.IOException - io error

addEmptyElement

public void addEmptyElement(java.lang.String tag)
                     throws java.io.IOException
Description copied from interface: XmlWriter
Adds an empty element tag. Ex: <TAG/>

Specified by:
addEmptyElement in interface XmlWriter
Parameters:
tag - Tag
Throws:
java.io.IOException - io error

addEmptyElement

public void addEmptyElement(java.lang.String tag,
                            XmlAttribute[] attribs)
                     throws java.io.IOException
Description copied from interface: XmlWriter
Adds an empty start element tag with attributes. Ex: <TAG attrib="value"/>

Specified by:
addEmptyElement in interface XmlWriter
Parameters:
tag - Tag
attribs - Attributes
Throws:
java.io.IOException - io error

addEndElement

public void addEndElement()
                   throws java.io.IOException
Description copied from interface: XmlWriter
Adds an end element tag. Ex </TAG>

Specified by:
addEndElement in interface XmlWriter
Throws:
java.io.IOException - io error

addCharacters

public void addCharacters(char[] ch,
                          int start,
                          int length)
                   throws java.io.IOException
Description copied from interface: XmlWriter
Adds a segment of text.

Specified by:
addCharacters in interface XmlWriter
Parameters:
ch - The chars to add
start - Start offset of the ch array.
length - Number of chars to add
Throws:
java.io.IOException - io error

addCharacters

public void addCharacters(java.lang.String str)
                   throws java.io.IOException
Description copied from interface: XmlWriter
Adds a segment of text.

Specified by:
addCharacters in interface XmlWriter
Parameters:
str - Text to add
Throws:
java.io.IOException - io error

addOpaqueData

public void addOpaqueData(byte[] buff)
                   throws java.io.IOException
Throws:
java.io.IOException

addOpaqueData

public void addOpaqueData(byte[] buff,
                          int off,
                          int len)
                   throws java.io.IOException
Throws:
java.io.IOException

setTagTokens

public void setTagTokens(java.lang.String[] theTagTokens)
Sets the tag tokens.

Parameters:
theTagTokens - first element in this array defines tag #5

setAttrStartTokens

public void setAttrStartTokens(java.lang.String[] theAttrStrartTokens)
Sets the attribute start tokens.

Parameters:
theAttrStrartTokens - first element in this array defines attribute #85

setAttrValueTokens

public void setAttrValueTokens(java.lang.String[] theAttrValueTokens)
Sets the attribute value tokens.

Parameters:
theAttrValueTokens - first element in this array defines attribute #05


Copyright © 2002-2005 Markus Eriksson. All Rights Reserved.