Package org.kxml2.wap

Class WbxmlSerializer

java.lang.Object
org.kxml2.wap.WbxmlSerializer
All Implemented Interfaces:
org.xmlpull.v1.XmlSerializer

public class WbxmlSerializer extends Object implements org.xmlpull.v1.XmlSerializer
A class for writing WBXML.
  • Constructor Details

    • WbxmlSerializer

      public WbxmlSerializer()
  • Method Details

    • attribute

      public org.xmlpull.v1.XmlSerializer attribute(String namespace, String name, String value)
      Specified by:
      attribute in interface org.xmlpull.v1.XmlSerializer
    • cdsect

      public void cdsect(String cdsect) throws IOException
      Specified by:
      cdsect in interface org.xmlpull.v1.XmlSerializer
      Throws:
      IOException
    • comment

      public void comment(String comment)
      Specified by:
      comment in interface org.xmlpull.v1.XmlSerializer
    • docdecl

      public void docdecl(String docdecl)
      Specified by:
      docdecl in interface org.xmlpull.v1.XmlSerializer
    • entityRef

      public void entityRef(String er)
      Specified by:
      entityRef in interface org.xmlpull.v1.XmlSerializer
    • getDepth

      public int getDepth()
      Specified by:
      getDepth in interface org.xmlpull.v1.XmlSerializer
    • getFeature

      public boolean getFeature(String name)
      Specified by:
      getFeature in interface org.xmlpull.v1.XmlSerializer
    • getNamespace

      public String getNamespace()
      Specified by:
      getNamespace in interface org.xmlpull.v1.XmlSerializer
    • getName

      public String getName()
      Specified by:
      getName in interface org.xmlpull.v1.XmlSerializer
    • getPrefix

      public String getPrefix(String nsp, boolean create)
      Specified by:
      getPrefix in interface org.xmlpull.v1.XmlSerializer
    • getProperty

      public Object getProperty(String name)
      Specified by:
      getProperty in interface org.xmlpull.v1.XmlSerializer
    • ignorableWhitespace

      public void ignorableWhitespace(String sp)
      Specified by:
      ignorableWhitespace in interface org.xmlpull.v1.XmlSerializer
    • endDocument

      public void endDocument() throws IOException
      Specified by:
      endDocument in interface org.xmlpull.v1.XmlSerializer
      Throws:
      IOException
    • flush

      public void flush()
      ATTENTION: flush cannot work since Wbxml documents require buffering. Thus, this call does nothing.
      Specified by:
      flush in interface org.xmlpull.v1.XmlSerializer
    • checkPending

      public void checkPending(boolean degenerated) throws IOException
      Throws:
      IOException
    • processingInstruction

      public void processingInstruction(String pi)
      Specified by:
      processingInstruction in interface org.xmlpull.v1.XmlSerializer
    • setFeature

      public void setFeature(String name, boolean value)
      Specified by:
      setFeature in interface org.xmlpull.v1.XmlSerializer
    • setOutput

      public void setOutput(Writer writer)
      Specified by:
      setOutput in interface org.xmlpull.v1.XmlSerializer
    • setOutput

      public void setOutput(OutputStream out, String encoding) throws IOException
      Specified by:
      setOutput in interface org.xmlpull.v1.XmlSerializer
      Throws:
      IOException
    • setPrefix

      public void setPrefix(String prefix, String nsp)
      Specified by:
      setPrefix in interface org.xmlpull.v1.XmlSerializer
    • setProperty

      public void setProperty(String property, Object value)
      Specified by:
      setProperty in interface org.xmlpull.v1.XmlSerializer
    • startDocument

      public void startDocument(String s, Boolean b) throws IOException
      Specified by:
      startDocument in interface org.xmlpull.v1.XmlSerializer
      Throws:
      IOException
    • startTag

      public org.xmlpull.v1.XmlSerializer startTag(String namespace, String name) throws IOException
      Specified by:
      startTag in interface org.xmlpull.v1.XmlSerializer
      Throws:
      IOException
    • text

      public org.xmlpull.v1.XmlSerializer text(char[] chars, int start, int len) throws IOException
      Specified by:
      text in interface org.xmlpull.v1.XmlSerializer
      Throws:
      IOException
    • text

      public org.xmlpull.v1.XmlSerializer text(String text) throws IOException
      Specified by:
      text in interface org.xmlpull.v1.XmlSerializer
      Throws:
      IOException
    • endTag

      public org.xmlpull.v1.XmlSerializer endTag(String namespace, String name) throws IOException
      Specified by:
      endTag in interface org.xmlpull.v1.XmlSerializer
      Throws:
      IOException
    • writeWapExtension

      public void writeWapExtension(int type, Object data) throws IOException
      Throws:
      IOException
    • setTagTable

      public void setTagTable(int page, String[] tagTable)
      Sets the tag table for a given page. The first string in the array defines tag 5, the second tag 6 etc.
    • setAttrStartTable

      public void setAttrStartTable(int page, String[] attrStartTable)
      Sets the attribute start Table for a given page. The first string in the array defines attribute 5, the second attribute 6 etc. Please use the character '=' (without quote!) as delimiter between the attribute name and the (start of the) value
    • setAttrValueTable

      public void setAttrValueTable(int page, String[] attrValueTable)
      Sets the attribute value Table for a given page. The first string in the array defines attribute value 0x85, the second attribute value 0x86 etc.