|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.freehep.wbxml.WBXMLWriter
public class WBXMLWriter
Writes out Binary XML see http://www.wapforum.org instead of ASCII XML.
Constructor Summary | |
---|---|
WBXMLWriter(OutputStream os,
int maxAttributeTagCode)
Create a Binary AIDA Writer for given stream |
Method Summary | |
---|---|
void |
close()
Close writer |
void |
closeDoc()
Close XML doc |
void |
closeTag()
Close nearest tag |
void |
openDoc()
Open XML doc with standard parameters |
void |
openDoc(String version,
String encoding,
boolean standalone)
Open XML doc |
void |
openTag(int tag)
Write an xml open tag |
void |
print(String text)
|
void |
printComment(String comment)
|
void |
printTag(int tag)
Write empty tag |
void |
referToDTD(String name,
String system)
|
void |
referToDTD(String name,
String pid,
String ref)
|
void |
setAttribute(int tag,
boolean value)
Set boolean attribute |
void |
setAttribute(int tag,
boolean[] value,
int offset,
int length)
Set boolean attribute |
void |
setAttribute(int tag,
byte value)
Set byte attribute |
void |
setAttribute(int tag,
byte[] value,
int offset,
int length)
Set byte attribute |
void |
setAttribute(int tag,
char value)
Set char attribute |
void |
setAttribute(int tag,
char[] value,
int offset,
int length)
Set char attribute |
void |
setAttribute(int tag,
Color value)
Set Color attribute |
void |
setAttribute(int tag,
Color[] value,
int offset,
int length)
Set Color attribute |
void |
setAttribute(int tag,
double value)
Set double attribute |
void |
setAttribute(int tag,
double[] value,
int offset,
int length)
Set double attribute |
void |
setAttribute(int tag,
float value)
Set float attribute |
void |
setAttribute(int tag,
float[] value,
int offset,
int length)
Set float attribute |
void |
setAttribute(int tag,
int value)
Set int attribute |
void |
setAttribute(int tag,
int[] value,
int offset,
int length)
Set int attribute |
void |
setAttribute(int tag,
long value)
Set long attribute |
void |
setAttribute(int tag,
long[] value,
int offset,
int length)
Set long attribute |
void |
setAttribute(int tag,
short value)
Set short attribute |
void |
setAttribute(int tag,
short[] value,
int offset,
int length)
Set short attribute |
void |
setAttribute(int tag,
String value)
Set String attribute |
void |
setAttribute(int tag,
String[] value,
int offset,
int length)
Set String attribute |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public WBXMLWriter(OutputStream os, int maxAttributeTagCode) throws IOException
os
- stream to write tomaxAttributeCode
- largest tagcode for attributes
IOException
Method Detail |
---|
public void close() throws IOException
WBXMLTagWriter
close
in interface WBXMLTagWriter
IOException
- if stream cannot be writtenpublic void openDoc() throws IOException
WBXMLTagWriter
openDoc
in interface WBXMLTagWriter
IOException
- if stream cannot be writtenpublic void openDoc(String version, String encoding, boolean standalone) throws IOException
WBXMLTagWriter
openDoc
in interface WBXMLTagWriter
version
- version stringencoding
- encodingstandalone
- if XML is standalone
IOException
- if stream cannot be writtenpublic void closeDoc() throws IOException
WBXMLTagWriter
closeDoc
in interface WBXMLTagWriter
IOException
- if stream cannot be writtenpublic void referToDTD(String name, String pid, String ref)
referToDTD
in interface WBXMLTagWriter
public void referToDTD(String name, String system)
referToDTD
in interface WBXMLTagWriter
public void openTag(int tag) throws IOException
WBXMLTagWriter
openTag
in interface WBXMLTagWriter
IOException
- if stream cannot be writtenpublic void closeTag() throws IOException
WBXMLTagWriter
closeTag
in interface WBXMLTagWriter
IOException
- if stream cannot be writtenpublic void printTag(int tag) throws IOException
WBXMLTagWriter
printTag
in interface WBXMLTagWriter
IOException
- if stream cannot be writtenpublic void print(String text) throws IOException
print
in interface WBXMLTagWriter
IOException
public void printComment(String comment) throws IOException
printComment
in interface WBXMLTagWriter
IOException
public void setAttribute(int tag, String value)
WBXMLTagWriter
setAttribute
in interface WBXMLTagWriter
tag
- attributeIDvalue
- attribute valuepublic void setAttribute(int tag, String[] value, int offset, int length)
WBXMLTagWriter
setAttribute
in interface WBXMLTagWriter
tag
- attributeIDvalue
- attribute valueoffset
- start index in arraylength
- number of primitives/object to writepublic void setAttribute(int tag, byte value)
WBXMLTagWriter
setAttribute
in interface WBXMLTagWriter
tag
- attributeIDvalue
- attribute valuepublic void setAttribute(int tag, byte[] value, int offset, int length)
WBXMLTagWriter
setAttribute
in interface WBXMLTagWriter
tag
- attributeIDvalue
- attribute valueoffset
- start index in arraylength
- number of primitives/object to writepublic void setAttribute(int tag, long value)
WBXMLTagWriter
setAttribute
in interface WBXMLTagWriter
tag
- attributeIDvalue
- attribute valuepublic void setAttribute(int tag, long[] value, int offset, int length)
WBXMLTagWriter
setAttribute
in interface WBXMLTagWriter
tag
- attributeIDvalue
- attribute valueoffset
- start index in arraylength
- number of primitives/object to writepublic void setAttribute(int tag, int value)
WBXMLTagWriter
setAttribute
in interface WBXMLTagWriter
tag
- attributeIDvalue
- attribute valuepublic void setAttribute(int tag, int[] value, int offset, int length)
WBXMLTagWriter
setAttribute
in interface WBXMLTagWriter
tag
- attributeIDvalue
- attribute valueoffset
- start index in arraylength
- number of primitives/object to writepublic void setAttribute(int tag, boolean value)
WBXMLTagWriter
setAttribute
in interface WBXMLTagWriter
tag
- attributeIDvalue
- attribute valuepublic void setAttribute(int tag, boolean[] value, int offset, int length)
WBXMLTagWriter
setAttribute
in interface WBXMLTagWriter
tag
- attributeIDvalue
- attribute valueoffset
- start index in arraylength
- number of primitives/object to writepublic void setAttribute(int tag, float value)
WBXMLTagWriter
setAttribute
in interface WBXMLTagWriter
tag
- attributeIDvalue
- attribute valuepublic void setAttribute(int tag, float[] value, int offset, int length)
WBXMLTagWriter
setAttribute
in interface WBXMLTagWriter
tag
- attributeIDvalue
- attribute valueoffset
- start index in arraylength
- number of primitives/object to writepublic void setAttribute(int tag, double value)
WBXMLTagWriter
setAttribute
in interface WBXMLTagWriter
tag
- attributeIDvalue
- attribute valuepublic void setAttribute(int tag, double[] value, int offset, int length)
WBXMLTagWriter
setAttribute
in interface WBXMLTagWriter
tag
- attributeIDvalue
- attribute valueoffset
- start index in arraylength
- number of primitives/object to writepublic void setAttribute(int tag, Color value)
WBXMLTagWriter
setAttribute
in interface WBXMLTagWriter
tag
- attributeIDvalue
- attribute valuepublic void setAttribute(int tag, Color[] value, int offset, int length)
WBXMLTagWriter
setAttribute
in interface WBXMLTagWriter
tag
- attributeIDvalue
- attribute valueoffset
- start index in arraylength
- number of primitives/object to writepublic void setAttribute(int tag, char value)
WBXMLTagWriter
setAttribute
in interface WBXMLTagWriter
tag
- attributeIDvalue
- attribute valuepublic void setAttribute(int tag, char[] value, int offset, int length)
WBXMLTagWriter
setAttribute
in interface WBXMLTagWriter
tag
- attributeIDvalue
- attribute valueoffset
- start index in arraylength
- number of primitives/object to writepublic void setAttribute(int tag, short value)
WBXMLTagWriter
setAttribute
in interface WBXMLTagWriter
tag
- attributeIDvalue
- attribute valuepublic void setAttribute(int tag, short[] value, int offset, int length)
WBXMLTagWriter
setAttribute
in interface WBXMLTagWriter
tag
- attributeIDvalue
- attribute valueoffset
- start index in arraylength
- number of primitives/object to write
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |