Project

General

Profile

1
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
2
<!--NewPage-->
3
<html>
4
<head>
5
<!-- Generated by javadoc on Fri Sep 24 03:23:03 CEST 1999 -->
6
<title>
7
  Class de.tudarmstadt.ito.utils.XMLOutputStream
8
</title>
9
</head>
10
<body>
11
<a name="_top_"></a>
12
<pre>
13
<a href="packages.html">All Packages</a>  <a href="tree.html">Class Hierarchy</a>  <a href="Package-de.tudarmstadt.ito.utils.html">This Package</a>  <a href="de.tudarmstadt.ito.utils.TokenList.html#_top_">Previous</a>  <a href="Package-de.tudarmstadt.ito.utils.html">Next</a>  <a href="AllNames.html">Index</a></pre>
14
<hr>
15
<h1>
16
  Class de.tudarmstadt.ito.utils.XMLOutputStream
17
</h1>
18
<pre>
19
java.lang.Object
20
   |
21
   +----de.tudarmstadt.ito.utils.XMLOutputStream
22
</pre>
23
<hr>
24
<dl>
25
  <dt> public class <b>XMLOutputStream</b>
26
  <dt> extends Object
27
</dl>
28
Utility methods for writing an XML document to an OutputStream.
29
 <p>This is used as the base class for classes such as Map, which need to
30
 serialized themselves as XML.</p>
31
<p>
32
<hr>
33
<a name="index"></a>
34
<h2>
35
  <img src="images/variable-index.gif" width=207 height=38 alt="Variable Index">
36
</h2>
37
<dl>
38
  <dt> <img src="images/magenta-ball-small.gif" width=6 height=6 alt=" o ">
39
	<a href="#attrs"><b>attrs</b></a>
40
  <dd> Array for storing attribute names.
41
  <dt> <img src="images/magenta-ball-small.gif" width=6 height=6 alt=" o ">
42
	<a href="#values"><b>values</b></a>
43
  <dd> Array for storing attribute values.
44
</dl>
45
<h2>
46
  <img src="images/constructor-index.gif" width=275 height=38 alt="Constructor Index">
47
</h2>
48
<dl>
49
  <dt> <img src="images/yellow-ball-small.gif" width=6 height=6 alt=" o ">
50
	<a href="#XMLOutputStream()"><b>XMLOutputStream</b></a>()
51
  <dd> Construct a new XMLOutputStream.
52
  <dt> <img src="images/yellow-ball-small.gif" width=6 height=6 alt=" o ">
53
	<a href="#XMLOutputStream(java.io.OutputStream)"><b>XMLOutputStream</b></a>(OutputStream)
54
  <dd> Construct a new XMLOutputStream and set the OutputStream.
55
</dl>
56
<h2>
57
  <img src="images/method-index.gif" width=207 height=38 alt="Method Index">
58
</h2>
59
<dl>
60
  <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">
61
	<a href="#allocateAttrs(int)"><b>allocateAttrs</b></a>(int)
62
  <dd>  Allocate the attrs and values arrays.
63
  <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">
64
	<a href="#initAttrs()"><b>initAttrs</b></a>()
65
  <dd> 
66
  <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">
67
	<a href="#setOutputStream(java.io.OutputStream)"><b>setOutputStream</b></a>(OutputStream)
68
  <dd>  Set the OutputStream.
69
  <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">
70
	<a href="#setPrettyPrinting(boolean, int)"><b>setPrettyPrinting</b></a>(boolean, int)
71
  <dd>  Set the pretty printing options.
72
  <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">
73
	<a href="#writeCharacters(byte[])"><b>writeCharacters</b></a>(byte[])
74
  <dd>  Write PCDATA.
75
  <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">
76
	<a href="#writeCharacters(byte[], int, int)"><b>writeCharacters</b></a>(byte[], int, int)
77
  <dd>  Write PCDATA starting at a given position
78
 
79
  <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">
80
	<a href="#writeDOCTYPE(byte[], byte[], byte[])"><b>writeDOCTYPE</b></a>(byte[], byte[], byte[])
81
  <dd>  Write the DOCTYPE statement.
82
  <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">
83
	<a href="#writeElementEnd(byte[])"><b>writeElementEnd</b></a>(byte[])
84
  <dd>  Write an element end tag.
85
  <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">
86
	<a href="#writeElementStart(byte[], byte[][], byte[][], boolean)"><b>writeElementStart</b></a>(byte[], byte[][], byte[][], boolean)
87
  <dd>  Write an element start tag.
88
  <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">
89
	<a href="#writeXMLDecl(byte[])"><b>writeXMLDecl</b></a>(byte[])
90
  <dd>  Write the XML declaration.
91
  <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">
92
	<a href="#writeXMLDecl(byte[], boolean)"><b>writeXMLDecl</b></a>(byte[], boolean)
93
  <dd>  Write the XML declaration with a standalone declaration.
94
</dl>
95
<a name="variables"></a>
96
<h2>
97
  <img src="images/variables.gif" width=153 height=38 alt="Variables">
98
</h2>
99
<a name="attrs"><img src="images/magenta-ball.gif" width=12 height=12 alt=" o "></a>
100
<b>attrs</b>
101
<pre>
102
 public byte attrs[][]
103
</pre>
104
<dl>
105
  <dd> Array for storing attribute names.<p>
106
</dl>
107
<a name="values"><img src="images/magenta-ball.gif" width=12 height=12 alt=" o "></a>
108
<b>values</b>
109
<pre>
110
 public byte values[][]
111
</pre>
112
<dl>
113
  <dd> Array for storing attribute values.<p>
114
</dl>
115
<a name="constructors"></a>
116
<h2>
117
  <img src="images/constructors.gif" width=231 height=38 alt="Constructors">
118
</h2>
119
<a name="XMLOutputStream"></a>
120
<a name="XMLOutputStream()"><img src="images/yellow-ball.gif" width=12 height=12 alt=" o "></a>
121
<b>XMLOutputStream</b>
122
<pre>
123
 public XMLOutputStream()
124
</pre>
125
<dl>
126
  <dd> Construct a new XMLOutputStream.
127
<p>
128
</dl>
129
<a name="XMLOutputStream(java.io.OutputStream)"><img src="images/yellow-ball.gif" width=12 height=12 alt=" o "></a>
130
<b>XMLOutputStream</b>
131
<pre>
132
 public XMLOutputStream(OutputStream out)
133
</pre>
134
<dl>
135
  <dd> Construct a new XMLOutputStream and set the OutputStream.
136
<p>
137
</dl>
138
<a name="methods"></a>
139
<h2>
140
  <img src="images/methods.gif" width=151 height=38 alt="Methods">
141
</h2>
142
<a name="setOutputStream(java.io.OutputStream)"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a>
143
<a name="setOutputStream"><b>setOutputStream</b></a>
144
<pre>
145
 public void setOutputStream(OutputStream out)
146
</pre>
147
<dl>
148
  <dd> Set the OutputStream.
149
<p>
150
  <dd><dl>
151
    <dt> <b>Parameters:</b>
152
    <dd> out - The output stream.
153
  </dl></dd>
154
</dl>
155
<a name="setPrettyPrinting(boolean, int)"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a>
156
<a name="setPrettyPrinting"><b>setPrettyPrinting</b></a>
157
<pre>
158
 public void setPrettyPrinting(boolean pretty,
159
                               int increment)
160
</pre>
161
<dl>
162
  <dd> Set the pretty printing options.
163
<p>
164
  <dd><dl>
165
    <dt> <b>Parameters:</b>
166
    <dd> pretty - Whether to perform pretty printing.
167
    <dd> increment - The number of spaces by which to indent nested
168
  child elements in their parent. If this is less then 0, it is
169
  set to 3.
170
  </dl></dd>
171
</dl>
172
<a name="writeXMLDecl(byte[])"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a>
173
<a name="writeXMLDecl"><b>writeXMLDecl</b></a>
174
<pre>
175
 public void writeXMLDecl(byte encoding[]) throws IOException
176
</pre>
177
<dl>
178
  <dd> Write the XML declaration.
179
<p>
180
  <dd><dl>
181
    <dt> <b>Parameters:</b>
182
    <dd> encoding - The encoding to use. May be null.
183
  </dl></dd>
184
</dl>
185
<a name="writeXMLDecl(byte[], boolean)"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a>
186
<a name="writeXMLDecl"><b>writeXMLDecl</b></a>
187
<pre>
188
 public void writeXMLDecl(byte encoding[],
189
                          boolean standalone) throws IOException
190
</pre>
191
<dl>
192
  <dd> Write the XML declaration with a standalone declaration.
193
<p>
194
  <dd><dl>
195
    <dt> <b>Parameters:</b>
196
    <dd> encoding - The encoding to use. May be null.
197
    <dd> standalone - Whether the standalone declaration is yes or no.
198
  </dl></dd>
199
</dl>
200
<a name="writeDOCTYPE(byte[], byte[], byte[])"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a>
201
<a name="writeDOCTYPE"><b>writeDOCTYPE</b></a>
202
<pre>
203
 public void writeDOCTYPE(byte root[],
204
                          byte systemID[],
205
                          byte publicID[]) throws IOException
206
</pre>
207
<dl>
208
  <dd> Write the DOCTYPE statement. Internal subsets are not supported.
209
<p>
210
  <dd><dl>
211
    <dt> <b>Parameters:</b>
212
    <dd> root - The root element type.
213
    <dd> systemID - The system ID of the external subset.
214
    <dd> publicID - The public ID of the external subset. May be null.
215
  </dl></dd>
216
</dl>
217
<a name="writeElementStart(byte[], byte[][], byte[][], boolean)"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a>
218
<a name="writeElementStart"><b>writeElementStart</b></a>
219
<pre>
220
 public void writeElementStart(byte name[],
221
                               byte attrs[][],
222
                               byte values[][],
223
                               boolean empty) throws IOException
224
</pre>
225
<dl>
226
  <dd> Write an element start tag.
227
<p>
228
  <dd><dl>
229
    <dt> <b>Parameters:</b>
230
    <dd> name - The name of the element type.
231
    <dd> attrs - The attribute names. May be null.
232
    <dd> values - The attribute values. Must match attrs in number and order.
233
  May be null.
234
    <dd> empty - Whether the element is empty.
235
  </dl></dd>
236
</dl>
237
<a name="writeElementEnd(byte[])"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a>
238
<a name="writeElementEnd"><b>writeElementEnd</b></a>
239
<pre>
240
 public void writeElementEnd(byte name[]) throws IOException
241
</pre>
242
<dl>
243
  <dd> Write an element end tag.
244
<p>
245
  <dd><dl>
246
    <dt> <b>Parameters:</b>
247
    <dd> name - The name of the element type.
248
  </dl></dd>
249
</dl>
250
<a name="writeCharacters(byte[])"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a>
251
<a name="writeCharacters"><b>writeCharacters</b></a>
252
<pre>
253
 public void writeCharacters(byte characters[]) throws IOException
254
</pre>
255
<dl>
256
  <dd> Write PCDATA.
257
<p>
258
  <dd><dl>
259
    <dt> <b>Parameters:</b>
260
    <dd> characters - The PCDATA.
261
  </dl></dd>
262
</dl>
263
<a name="writeCharacters(byte[], int, int)"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a>
264
<a name="writeCharacters"><b>writeCharacters</b></a>
265
<pre>
266
 public void writeCharacters(byte characters[],
267
                             int start,
268
                             int length) throws IOException
269
</pre>
270
<dl>
271
  <dd> Write PCDATA starting at a given position
272
<p>
273
  <dd><dl>
274
    <dt> <b>Parameters:</b>
275
    <dd> characters - The PCDATA.
276
    <dd> start - The start position.
277
    <dd> length - The number of characters to write.
278
  </dl></dd>
279
</dl>
280
<a name="allocateAttrs(int)"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a>
281
<a name="allocateAttrs"><b>allocateAttrs</b></a>
282
<pre>
283
 public void allocateAttrs(int size)
284
</pre>
285
<dl>
286
  <dd> Allocate the attrs and values arrays. Generally, subclasses
287
 allocate arrays large enough to handle the maximum number of
288
 attributes found on any element type. Before each call to
289
 writeElementStart, they then call initAttrs, which initializes
290
 the attributes to nulls; writeElementStart stops writing attributes
291
 the first time it encounters a value of the attrs variable that is null.
292
<p>
293
  <dd><dl>
294
    <dt> <b>Parameters:</b>
295
    <dd> size - The array size.
296
  </dl></dd>
297
</dl>
298
<a name="initAttrs()"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a>
299
<a name="initAttrs"><b>initAttrs</b></a>
300
<pre>
301
 public void initAttrs()
302
</pre>
303
<hr>
304
<pre>
305
<a href="packages.html">All Packages</a>  <a href="tree.html">Class Hierarchy</a>  <a href="Package-de.tudarmstadt.ito.utils.html">This Package</a>  <a href="de.tudarmstadt.ito.utils.TokenList.html#_top_">Previous</a>  <a href="Package-de.tudarmstadt.ito.utils.html">Next</a>  <a href="AllNames.html">Index</a></pre>
306
</body>
307
</html>
(48-48/72)