Subversion Repositories AndroidProjects

Rev

Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
356 chris 1
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
2
<!--NewPage-->
3
<HTML>
4
<HEAD>
5
<!-- Generated by javadoc (build 1.6.0_26) on Sun Jan 27 20:37:08 CET 2013 -->
6
<TITLE>
7
DataOutput (libgdx API)
8
</TITLE>
9
 
10
<META NAME="date" CONTENT="2013-01-27">
11
 
12
<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../../stylesheet.css" TITLE="Style">
13
 
14
<SCRIPT type="text/javascript">
15
function windowTitle()
16
{
17
    if (location.href.indexOf('is-external=true') == -1) {
18
        parent.document.title="DataOutput (libgdx API)";
19
    }
20
}
21
</SCRIPT>
22
<NOSCRIPT>
23
</NOSCRIPT>
24
 
25
</HEAD>
26
 
27
<BODY BGCOLOR="white" onload="windowTitle();">
28
<HR>
29
 
30
 
31
<!-- ========= START OF TOP NAVBAR ======= -->
32
<A NAME="navbar_top"><!-- --></A>
33
<A HREF="#skip-navbar_top" title="Skip navigation links"></A>
34
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
35
<TR>
36
<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
37
<A NAME="navbar_top_firstrow"><!-- --></A>
38
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
39
  <TR ALIGN="center" VALIGN="top">
40
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
41
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
42
  <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
43
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="class-use/DataOutput.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A>&nbsp;</TD>
44
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
45
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
46
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
47
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
48
  </TR>
49
</TABLE>
50
</TD>
51
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
52
 
53
                                libgdx API
54
                                <style>
55
                                body, td, th { font-family:Helvetica, Tahoma, Arial, sans-serif; font-size:10pt }
56
                                pre, code, tt { font-size:9pt; font-family:Lucida Console, Courier New, sans-serif }
57
                                h1, h2, h3, .FrameTitleFont, .FrameHeadingFont, .TableHeadingColor font { font-size:105%;  font-weight:bold }
58
                                .TableHeadingColor { background:#EEEEFF; }
59
                                a { text-decoration:none }
60
                                a:hover { text-decoration:underline }
61
                                a:link, a:visited { color:blue }
62
                                table { border:0px }
63
                                .TableRowColor td:first-child { border-left:1px solid black }
64
                                .TableRowColor td { border:0px; border-bottom:1px solid black; border-right:1px solid black }
65
                                hr { border:0px; border-bottom:1px solid #333366; }
66
                                </style>
67
                        </EM>
68
</TD>
69
</TR>
70
 
71
<TR>
72
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
73
&nbsp;<A HREF="../../../../com/badlogic/gdx/utils/DataInput.html" title="class in com.badlogic.gdx.utils"><B>PREV CLASS</B></A>&nbsp;
74
&nbsp;<A HREF="../../../../com/badlogic/gdx/utils/DelayedRemovalArray.html" title="class in com.badlogic.gdx.utils"><B>NEXT CLASS</B></A></FONT></TD>
75
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
76
  <A HREF="../../../../index.html?com/badlogic/gdx/utils/DataOutput.html" target="_top"><B>FRAMES</B></A>  &nbsp;
77
&nbsp;<A HREF="DataOutput.html" target="_top"><B>NO FRAMES</B></A>  &nbsp;
78
&nbsp;<SCRIPT type="text/javascript">
79
  <!--
80
  if(window==top) {
81
    document.writeln('<A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A>');
82
  }
83
  //-->
84
</SCRIPT>
85
<NOSCRIPT>
86
  <A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A>
87
</NOSCRIPT>
88
 
89
 
90
</FONT></TD>
91
</TR>
92
<TR>
93
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
94
  SUMMARY:&nbsp;NESTED&nbsp;|&nbsp;<A HREF="#fields_inherited_from_class_java.io.DataOutputStream">FIELD</A>&nbsp;|&nbsp;<A HREF="#constructor_summary">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
95
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
96
DETAIL:&nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_detail">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD>
97
</TR>
98
</TABLE>
99
<A NAME="skip-navbar_top"></A>
100
<!-- ========= END OF TOP NAVBAR ========= -->
101
 
102
<HR>
103
<!-- ======== START OF CLASS DATA ======== -->
104
<H2>
105
<FONT SIZE="-1">
106
com.badlogic.gdx.utils</FONT>
107
<BR>
108
Class DataOutput</H2>
109
<PRE>
110
java.lang.Object
111
  <IMG SRC="../../../../resources/inherit.gif" ALT="extended by ">java.io.OutputStream
112
      <IMG SRC="../../../../resources/inherit.gif" ALT="extended by ">java.io.FilterOutputStream
113
          <IMG SRC="../../../../resources/inherit.gif" ALT="extended by ">java.io.DataOutputStream
114
              <IMG SRC="../../../../resources/inherit.gif" ALT="extended by "><B>com.badlogic.gdx.utils.DataOutput</B>
115
</PRE>
116
<DL>
117
<DT><B>All Implemented Interfaces:</B> <DD>java.io.Closeable, java.io.DataOutput, java.io.Flushable</DD>
118
</DL>
119
<HR>
120
<DL>
121
<DT><PRE>public class <B>DataOutput</B><DT>extends java.io.DataOutputStream</DL>
122
</PRE>
123
 
124
<P>
125
Extends <CODE>DataOutputStream</CODE> with additional convenience methods.
126
<P>
127
 
128
<P>
129
<DL>
130
<DT><B>Author:</B></DT>
131
  <DD>Nathan Sweet</DD>
132
</DL>
133
<HR>
134
 
135
<P>
136
<!-- =========== FIELD SUMMARY =========== -->
137
 
138
<A NAME="field_summary"><!-- --></A>
139
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
140
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
141
<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
142
<B>Field Summary</B></FONT></TH>
143
</TR>
144
</TABLE>
145
&nbsp;<A NAME="fields_inherited_from_class_java.io.DataOutputStream"><!-- --></A>
146
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
147
<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
148
<TH ALIGN="left"><B>Fields inherited from class java.io.DataOutputStream</B></TH>
149
</TR>
150
<TR BGCOLOR="white" CLASS="TableRowColor">
151
<TD><CODE>written</CODE></TD>
152
</TR>
153
</TABLE>
154
&nbsp;<A NAME="fields_inherited_from_class_java.io.FilterOutputStream"><!-- --></A>
155
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
156
<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
157
<TH ALIGN="left"><B>Fields inherited from class java.io.FilterOutputStream</B></TH>
158
</TR>
159
<TR BGCOLOR="white" CLASS="TableRowColor">
160
<TD><CODE>out</CODE></TD>
161
</TR>
162
</TABLE>
163
&nbsp;
164
<!-- ======== CONSTRUCTOR SUMMARY ======== -->
165
 
166
<A NAME="constructor_summary"><!-- --></A>
167
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
168
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
169
<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
170
<B>Constructor Summary</B></FONT></TH>
171
</TR>
172
<TR BGCOLOR="white" CLASS="TableRowColor">
173
<TD><CODE><B><A HREF="../../../../com/badlogic/gdx/utils/DataOutput.html#DataOutput(java.io.OutputStream)">DataOutput</A></B>(java.io.OutputStream&nbsp;out)</CODE>
174
 
175
<BR>
176
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
177
</TR>
178
</TABLE>
179
&nbsp;
180
<!-- ========== METHOD SUMMARY =========== -->
181
 
182
<A NAME="method_summary"><!-- --></A>
183
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
184
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
185
<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
186
<B>Method Summary</B></FONT></TH>
187
</TR>
188
<TR BGCOLOR="white" CLASS="TableRowColor">
189
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
190
<CODE>&nbsp;int</CODE></FONT></TD>
191
<TD><CODE><B><A HREF="../../../../com/badlogic/gdx/utils/DataOutput.html#writeInt(int, boolean)">writeInt</A></B>(int&nbsp;value,
192
         boolean&nbsp;optimizePositive)</CODE>
193
 
194
<BR>
195
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Writes a 1-5 byte int.</TD>
196
</TR>
197
<TR BGCOLOR="white" CLASS="TableRowColor">
198
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
199
<CODE>&nbsp;void</CODE></FONT></TD>
200
<TD><CODE><B><A HREF="../../../../com/badlogic/gdx/utils/DataOutput.html#writeString(java.lang.String)">writeString</A></B>(java.lang.String&nbsp;value)</CODE>
201
 
202
<BR>
203
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Writes a length and then the string as UTF8.</TD>
204
</TR>
205
</TABLE>
206
&nbsp;<A NAME="methods_inherited_from_class_java.io.DataOutputStream"><!-- --></A>
207
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
208
<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
209
<TH ALIGN="left"><B>Methods inherited from class java.io.DataOutputStream</B></TH>
210
</TR>
211
<TR BGCOLOR="white" CLASS="TableRowColor">
212
<TD><CODE>flush, size, write, write, writeBoolean, writeByte, writeBytes, writeChar, writeChars, writeDouble, writeFloat, writeInt, writeLong, writeShort, writeUTF</CODE></TD>
213
</TR>
214
</TABLE>
215
&nbsp;<A NAME="methods_inherited_from_class_java.io.FilterOutputStream"><!-- --></A>
216
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
217
<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
218
<TH ALIGN="left"><B>Methods inherited from class java.io.FilterOutputStream</B></TH>
219
</TR>
220
<TR BGCOLOR="white" CLASS="TableRowColor">
221
<TD><CODE>close, write</CODE></TD>
222
</TR>
223
</TABLE>
224
&nbsp;<A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A>
225
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
226
<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
227
<TH ALIGN="left"><B>Methods inherited from class java.lang.Object</B></TH>
228
</TR>
229
<TR BGCOLOR="white" CLASS="TableRowColor">
230
<TD><CODE>clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait</CODE></TD>
231
</TR>
232
</TABLE>
233
&nbsp;<A NAME="methods_inherited_from_class_java.io.DataOutput"><!-- --></A>
234
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
235
<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
236
<TH ALIGN="left"><B>Methods inherited from interface java.io.DataOutput</B></TH>
237
</TR>
238
<TR BGCOLOR="white" CLASS="TableRowColor">
239
<TD><CODE>write</CODE></TD>
240
</TR>
241
</TABLE>
242
&nbsp;
243
<P>
244
 
245
<!-- ========= CONSTRUCTOR DETAIL ======== -->
246
 
247
<A NAME="constructor_detail"><!-- --></A>
248
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
249
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
250
<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
251
<B>Constructor Detail</B></FONT></TH>
252
</TR>
253
</TABLE>
254
 
255
<A NAME="DataOutput(java.io.OutputStream)"><!-- --></A><H3>
256
DataOutput</H3>
257
<PRE>
258
public <B>DataOutput</B>(java.io.OutputStream&nbsp;out)</PRE>
259
<DL>
260
</DL>
261
 
262
<!-- ============ METHOD DETAIL ========== -->
263
 
264
<A NAME="method_detail"><!-- --></A>
265
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
266
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
267
<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
268
<B>Method Detail</B></FONT></TH>
269
</TR>
270
</TABLE>
271
 
272
<A NAME="writeInt(int, boolean)"><!-- --></A><H3>
273
writeInt</H3>
274
<PRE>
275
public int <B>writeInt</B>(int&nbsp;value,
276
                    boolean&nbsp;optimizePositive)
277
             throws java.io.IOException</PRE>
278
<DL>
279
<DD>Writes a 1-5 byte int.
280
<P>
281
<DD><DL>
282
<DT><B>Parameters:</B><DD><CODE>optimizePositive</CODE> - If true, small positive numbers will be more efficient (1 byte) and small negative numbers will be
283
           inefficient (5 bytes).
284
<DT><B>Throws:</B>
285
<DD><CODE>java.io.IOException</CODE></DL>
286
</DD>
287
</DL>
288
<HR>
289
 
290
<A NAME="writeString(java.lang.String)"><!-- --></A><H3>
291
writeString</H3>
292
<PRE>
293
public void <B>writeString</B>(java.lang.String&nbsp;value)
294
                 throws java.io.IOException</PRE>
295
<DL>
296
<DD>Writes a length and then the string as UTF8.
297
<P>
298
<DD><DL>
299
<DT><B>Parameters:</B><DD><CODE>value</CODE> - May be null.
300
<DT><B>Throws:</B>
301
<DD><CODE>java.io.IOException</CODE></DL>
302
</DD>
303
</DL>
304
<!-- ========= END OF CLASS DATA ========= -->
305
<HR>
306
 
307
 
308
<!-- ======= START OF BOTTOM NAVBAR ====== -->
309
<A NAME="navbar_bottom"><!-- --></A>
310
<A HREF="#skip-navbar_bottom" title="Skip navigation links"></A>
311
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
312
<TR>
313
<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
314
<A NAME="navbar_bottom_firstrow"><!-- --></A>
315
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
316
  <TR ALIGN="center" VALIGN="top">
317
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
318
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
319
  <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
320
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="class-use/DataOutput.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A>&nbsp;</TD>
321
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
322
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
323
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
324
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
325
  </TR>
326
</TABLE>
327
</TD>
328
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
329
libgdx API</EM>
330
</TD>
331
</TR>
332
 
333
<TR>
334
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
335
&nbsp;<A HREF="../../../../com/badlogic/gdx/utils/DataInput.html" title="class in com.badlogic.gdx.utils"><B>PREV CLASS</B></A>&nbsp;
336
&nbsp;<A HREF="../../../../com/badlogic/gdx/utils/DelayedRemovalArray.html" title="class in com.badlogic.gdx.utils"><B>NEXT CLASS</B></A></FONT></TD>
337
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
338
  <A HREF="../../../../index.html?com/badlogic/gdx/utils/DataOutput.html" target="_top"><B>FRAMES</B></A>  &nbsp;
339
&nbsp;<A HREF="DataOutput.html" target="_top"><B>NO FRAMES</B></A>  &nbsp;
340
&nbsp;<SCRIPT type="text/javascript">
341
  <!--
342
  if(window==top) {
343
    document.writeln('<A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A>');
344
  }
345
  //-->
346
</SCRIPT>
347
<NOSCRIPT>
348
  <A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A>
349
</NOSCRIPT>
350
 
351
 
352
</FONT></TD>
353
</TR>
354
<TR>
355
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
356
  SUMMARY:&nbsp;NESTED&nbsp;|&nbsp;<A HREF="#fields_inherited_from_class_java.io.DataOutputStream">FIELD</A>&nbsp;|&nbsp;<A HREF="#constructor_summary">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
357
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
358
DETAIL:&nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_detail">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD>
359
</TR>
360
</TABLE>
361
<A NAME="skip-navbar_bottom"></A>
362
<!-- ======== END OF BOTTOM NAVBAR ======= -->
363
 
364
<HR>
365
 
366
                                <div style="font-size:9pt"><i>
367
                                Copyright 2010 Mario Zechner (contact@badlogicgames.com), Nathan Sweet (admin@esotericsoftware.com)
368
                                </i></div>
369
 
370
</BODY>
371
</HTML>