1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
5 <!-- Generated by javadoc (build 1.5.0_09) on Tue Jan 08 20:46:02 GMT 2008 -->
7 DataOutputStream (leJOS NXT API documentation)
10 <META NAME="keywords" CONTENT="java.io.DataOutputStream class">
12 <LINK REL ="stylesheet" TYPE="text/css" HREF="../../stylesheet.css" TITLE="Style">
14 <SCRIPT type="text/javascript">
15 function windowTitle()
17 parent.document.title="DataOutputStream (leJOS NXT API documentation)";
25 <BODY BGCOLOR="white" onload="windowTitle();">
28 <!-- ========= START OF TOP NAVBAR ======= -->
29 <A NAME="navbar_top"><!-- --></A>
30 <A HREF="#skip-navbar_top" title="Skip navigation links"></A>
31 <TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
33 <TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
34 <A NAME="navbar_top_firstrow"><!-- --></A>
35 <TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
36 <TR ALIGN="center" VALIGN="top">
37 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD>
38 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD>
39 <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD>
40 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD>
41 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD>
42 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD>
43 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD>
47 <TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
53 <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
54 <A HREF="../../java/io/DataInputStream.html" title="class in java.io"><B>PREV CLASS</B></A>
55 <A HREF="../../java/io/File.html" title="class in java.io"><B>NEXT CLASS</B></A></FONT></TD>
56 <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
57 <A HREF="../../index.html?java/io/DataOutputStream.html" target="_top"><B>FRAMES</B></A>
58 <A HREF="DataOutputStream.html" target="_top"><B>NO FRAMES</B></A>
59 <SCRIPT type="text/javascript">
62 document.writeln('<A HREF="../../allclasses-noframe.html"><B>All Classes</B></A>');
67 <A HREF="../../allclasses-noframe.html"><B>All Classes</B></A>
74 <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
75 SUMMARY: NESTED | <A HREF="#field_summary">FIELD</A> | <A HREF="#constructor_summary">CONSTR</A> | <A HREF="#method_summary">METHOD</A></FONT></TD>
76 <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
77 DETAIL: <A HREF="#field_detail">FIELD</A> | <A HREF="#constructor_detail">CONSTR</A> | <A HREF="#method_detail">METHOD</A></FONT></TD>
80 <A NAME="skip-navbar_top"></A>
81 <!-- ========= END OF TOP NAVBAR ========= -->
84 <!-- ======== START OF CLASS DATA ======== -->
89 Class DataOutputStream</H2>
91 <A HREF="../../java/lang/Object.html" title="class in java.lang">java.lang.Object</A>
92 <IMG SRC="../../resources/inherit.gif" ALT="extended by "><A HREF="../../java/io/OutputStream.html" title="class in java.io">java.io.OutputStream</A>
93 <IMG SRC="../../resources/inherit.gif" ALT="extended by "><B>java.io.DataOutputStream</B>
97 <DT><PRE>public class <B>DataOutputStream</B><DT>extends <A HREF="../../java/io/OutputStream.html" title="class in java.io">OutputStream</A></DL>
101 Transmits java data types as bytes over an OutputStream.
108 <!-- =========== FIELD SUMMARY =========== -->
110 <A NAME="field_summary"><!-- --></A>
111 <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
112 <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
113 <TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
114 <B>Field Summary</B></FONT></TH>
116 <TR BGCOLOR="white" CLASS="TableRowColor">
117 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
118 <CODE>protected <A HREF="../../java/io/OutputStream.html" title="class in java.io">OutputStream</A></CODE></FONT></TD>
119 <TD><CODE><B><A HREF="../../java/io/DataOutputStream.html#out">out</A></B></CODE>
122 </TD>
124 <TR BGCOLOR="white" CLASS="TableRowColor">
125 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
126 <CODE>protected int</CODE></FONT></TD>
127 <TD><CODE><B><A HREF="../../java/io/DataOutputStream.html#written">written</A></B></CODE>
130 </TD>
134 <!-- ======== CONSTRUCTOR SUMMARY ======== -->
136 <A NAME="constructor_summary"><!-- --></A>
137 <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
138 <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
139 <TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
140 <B>Constructor Summary</B></FONT></TH>
142 <TR BGCOLOR="white" CLASS="TableRowColor">
143 <TD><CODE><B><A HREF="../../java/io/DataOutputStream.html#DataOutputStream(java.io.OutputStream)">DataOutputStream</A></B>(<A HREF="../../java/io/OutputStream.html" title="class in java.io">OutputStream</A> out)</CODE>
146 </TD>
150 <!-- ========== METHOD SUMMARY =========== -->
152 <A NAME="method_summary"><!-- --></A>
153 <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
154 <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
155 <TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
156 <B>Method Summary</B></FONT></TH>
158 <TR BGCOLOR="white" CLASS="TableRowColor">
159 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
160 <CODE> void</CODE></FONT></TD>
161 <TD><CODE><B><A HREF="../../java/io/DataOutputStream.html#close()">close</A></B>()</CODE>
164 Closes this data output stream.</TD>
166 <TR BGCOLOR="white" CLASS="TableRowColor">
167 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
168 <CODE> void</CODE></FONT></TD>
169 <TD><CODE><B><A HREF="../../java/io/DataOutputStream.html#flush()">flush</A></B>()</CODE>
172 Flushes this data output stream.</TD>
174 <TR BGCOLOR="white" CLASS="TableRowColor">
175 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
176 <CODE> int</CODE></FONT></TD>
177 <TD><CODE><B><A HREF="../../java/io/DataOutputStream.html#size()">size</A></B>()</CODE>
180 Returns the current value of the counter <code>written</code>,
181 the number of bytes written to this data output stream so far.</TD>
183 <TR BGCOLOR="white" CLASS="TableRowColor">
184 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
185 <CODE> void</CODE></FONT></TD>
186 <TD><CODE><B><A HREF="../../java/io/DataOutputStream.html#write(byte[], int, int)">write</A></B>(byte[] b,
191 Writes <code>len</code> bytes from the specified byte array
192 starting at offset <code>off</code> to the underlying output stream.</TD>
194 <TR BGCOLOR="white" CLASS="TableRowColor">
195 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
196 <CODE> void</CODE></FONT></TD>
197 <TD><CODE><B><A HREF="../../java/io/DataOutputStream.html#write(int)">write</A></B>(int b)</CODE>
200 Writes the specified byte (the low eight bits of the argument
201 <code>b</code>) to the underlying output stream.</TD>
203 <TR BGCOLOR="white" CLASS="TableRowColor">
204 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
205 <CODE> void</CODE></FONT></TD>
206 <TD><CODE><B><A HREF="../../java/io/DataOutputStream.html#writeBoolean(boolean)">writeBoolean</A></B>(boolean v)</CODE>
209 Writes a <code>boolean</code> to the underlying output stream as
212 <TR BGCOLOR="white" CLASS="TableRowColor">
213 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
214 <CODE> void</CODE></FONT></TD>
215 <TD><CODE><B><A HREF="../../java/io/DataOutputStream.html#writeByte(int)">writeByte</A></B>(int v)</CODE>
218 Writes out a <code>byte</code> to the underlying output stream as
221 <TR BGCOLOR="white" CLASS="TableRowColor">
222 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
223 <CODE> void</CODE></FONT></TD>
224 <TD><CODE><B><A HREF="../../java/io/DataOutputStream.html#writeChar(int)">writeChar</A></B>(int v)</CODE>
227 Writes a <code>char</code> to the underlying output stream as a
228 2-byte value, high byte first.</TD>
230 <TR BGCOLOR="white" CLASS="TableRowColor">
231 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
232 <CODE> void</CODE></FONT></TD>
233 <TD><CODE><B><A HREF="../../java/io/DataOutputStream.html#writeChars(java.lang.String)">writeChars</A></B>(<A HREF="../../java/lang/String.html" title="class in java.lang">String</A> value)</CODE>
236 </TD>
238 <TR BGCOLOR="white" CLASS="TableRowColor">
239 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
240 <CODE> void</CODE></FONT></TD>
241 <TD><CODE><B><A HREF="../../java/io/DataOutputStream.html#writeFloat(float)">writeFloat</A></B>(float v)</CODE>
244 Converts the float argument to an <code>int</code> using the
245 <code>floatToIntBits</code> method in class <code>Float</code>,
246 and then writes that <code>int</code> value to the underlying
247 output stream as a 4-byte quantity, high byte first.</TD>
249 <TR BGCOLOR="white" CLASS="TableRowColor">
250 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
251 <CODE> void</CODE></FONT></TD>
252 <TD><CODE><B><A HREF="../../java/io/DataOutputStream.html#writeInt(int)">writeInt</A></B>(int v)</CODE>
255 Writes an <code>int</code> to the underlying output stream as four
256 bytes, high byte first.</TD>
258 <TR BGCOLOR="white" CLASS="TableRowColor">
259 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
260 <CODE> void</CODE></FONT></TD>
261 <TD><CODE><B><A HREF="../../java/io/DataOutputStream.html#writeShort(int)">writeShort</A></B>(int v)</CODE>
264 Writes a <code>short</code> to the underlying output stream as two
265 bytes, high byte first.</TD>
268 <A NAME="methods_inherited_from_class_java.io.OutputStream"><!-- --></A>
269 <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
270 <TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
271 <TH ALIGN="left"><B>Methods inherited from class java.io.<A HREF="../../java/io/OutputStream.html" title="class in java.io">OutputStream</A></B></TH>
273 <TR BGCOLOR="white" CLASS="TableRowColor">
274 <TD><CODE><A HREF="../../java/io/OutputStream.html#write(byte[])">write</A></CODE></TD>
277 <A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A>
278 <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
279 <TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
280 <TH ALIGN="left"><B>Methods inherited from class java.lang.<A HREF="../../java/lang/Object.html" title="class in java.lang">Object</A></B></TH>
282 <TR BGCOLOR="white" CLASS="TableRowColor">
283 <TD><CODE><A HREF="../../java/lang/Object.html#equals(java.lang.Object)">equals</A>, <A HREF="../../java/lang/Object.html#getClass()">getClass</A>, <A HREF="../../java/lang/Object.html#hashCode()">hashCode</A>, <A HREF="../../java/lang/Object.html#notify()">notify</A>, <A HREF="../../java/lang/Object.html#notifyAll()">notifyAll</A>, <A HREF="../../java/lang/Object.html#toString()">toString</A>, <A HREF="../../java/lang/Object.html#wait()">wait</A>, <A HREF="../../java/lang/Object.html#wait(long)">wait</A></CODE></TD>
289 <!-- ============ FIELD DETAIL =========== -->
291 <A NAME="field_detail"><!-- --></A>
292 <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
293 <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
294 <TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
295 <B>Field Detail</B></FONT></TH>
299 <A NAME="written"><!-- --></A><H3>
302 protected int <B>written</B></PRE>
309 <A NAME="out"><!-- --></A><H3>
312 protected <A HREF="../../java/io/OutputStream.html" title="class in java.io">OutputStream</A> <B>out</B></PRE>
318 <!-- ========= CONSTRUCTOR DETAIL ======== -->
320 <A NAME="constructor_detail"><!-- --></A>
321 <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
322 <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
323 <TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
324 <B>Constructor Detail</B></FONT></TH>
328 <A NAME="DataOutputStream(java.io.OutputStream)"><!-- --></A><H3>
329 DataOutputStream</H3>
331 public <B>DataOutputStream</B>(<A HREF="../../java/io/OutputStream.html" title="class in java.io">OutputStream</A> out)</PRE>
335 <!-- ============ METHOD DETAIL ========== -->
337 <A NAME="method_detail"><!-- --></A>
338 <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
339 <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
340 <TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
341 <B>Method Detail</B></FONT></TH>
345 <A NAME="write(int)"><!-- --></A><H3>
348 public void <B>write</B>(int b)
349 throws <A HREF="../../java/io/IOException.html" title="class in java.io">IOException</A></PRE>
351 <DD>Writes the specified byte (the low eight bits of the argument
352 <code>b</code>) to the underlying output stream. If no exception
353 is thrown, the counter <code>written</code> is incremented by
356 Implements the <code>write</code> method of <code>OutputStream</code>.
359 <DT><B>Specified by:</B><DD><CODE><A HREF="../../java/io/OutputStream.html#write(int)">write</A></CODE> in class <CODE><A HREF="../../java/io/OutputStream.html" title="class in java.io">OutputStream</A></CODE></DL>
362 <DT><B>Parameters:</B><DD><CODE>b</CODE> - the <code>byte</code> to be written.
364 <DD><CODE><A HREF="../../java/io/IOException.html" title="class in java.io">IOException</A></CODE> - if an I/O error occurs.<DT><B>See Also:</B><DD><CODE>FilterOutputStream.out</CODE></DL>
369 <A NAME="write(byte[], int, int)"><!-- --></A><H3>
372 public void <B>write</B>(byte[] b,
375 throws <A HREF="../../java/io/IOException.html" title="class in java.io">IOException</A></PRE>
377 <DD>Writes <code>len</code> bytes from the specified byte array
378 starting at offset <code>off</code> to the underlying output stream.
379 If no exception is thrown, the counter <code>written</code> is
380 incremented by <code>len</code>.
383 <DT><B>Overrides:</B><DD><CODE><A HREF="../../java/io/OutputStream.html#write(byte[], int, int)">write</A></CODE> in class <CODE><A HREF="../../java/io/OutputStream.html" title="class in java.io">OutputStream</A></CODE></DL>
386 <DT><B>Parameters:</B><DD><CODE>b</CODE> - the data.<DD><CODE>off</CODE> - the start offset in the data.<DD><CODE>len</CODE> - the number of bytes to write.
388 <DD><CODE><A HREF="../../java/io/IOException.html" title="class in java.io">IOException</A></CODE> - if an I/O error occurs.<DT><B>See Also:</B><DD><CODE>FilterOutputStream.out</CODE></DL>
393 <A NAME="flush()"><!-- --></A><H3>
396 public void <B>flush</B>()
397 throws <A HREF="../../java/io/IOException.html" title="class in java.io">IOException</A></PRE>
399 <DD>Flushes this data output stream. This forces any buffered output
400 bytes to be written out to the stream.
402 The <code>flush</code> method of <code>DataOuputStream</code>
403 calls the <code>flush</code> method of its underlying output stream.
406 <DT><B>Overrides:</B><DD><CODE><A HREF="../../java/io/OutputStream.html#flush()">flush</A></CODE> in class <CODE><A HREF="../../java/io/OutputStream.html" title="class in java.io">OutputStream</A></CODE></DL>
411 <DD><CODE><A HREF="../../java/io/IOException.html" title="class in java.io">IOException</A></CODE> - if an I/O error occurs.<DT><B>See Also:</B><DD><CODE>FilterOutputStream.out</CODE>,
412 <A HREF="../../java/io/OutputStream.html#flush()"><CODE>OutputStream.flush()</CODE></A></DL>
417 <A NAME="close()"><!-- --></A><H3>
420 public void <B>close</B>()
421 throws <A HREF="../../java/io/IOException.html" title="class in java.io">IOException</A></PRE>
423 <DD>Closes this data output stream. This forces any buffered output
424 bytes to be written out to the stream.
426 The <code>close</code> method of <code>DataOuputStream</code>
427 calls the <code>close</code> method of its underlying output stream.
430 <DT><B>Overrides:</B><DD><CODE><A HREF="../../java/io/OutputStream.html#close()">close</A></CODE> in class <CODE><A HREF="../../java/io/OutputStream.html" title="class in java.io">OutputStream</A></CODE></DL>
435 <DD><CODE><A HREF="../../java/io/IOException.html" title="class in java.io">IOException</A></CODE> - if an I/O error occurs.<DT><B>See Also:</B><DD><CODE>FilterOutputStream.out</CODE>,
436 <A HREF="../../java/io/OutputStream.html#flush()"><CODE>OutputStream.flush()</CODE></A></DL>
441 <A NAME="writeBoolean(boolean)"><!-- --></A><H3>
444 public final void <B>writeBoolean</B>(boolean v)
445 throws <A HREF="../../java/io/IOException.html" title="class in java.io">IOException</A></PRE>
447 <DD>Writes a <code>boolean</code> to the underlying output stream as
448 a 1-byte value. The value <code>true</code> is written out as the
449 value <code>(byte)1</code>; the value <code>false</code> is
450 written out as the value <code>(byte)0</code>. If no exception is
451 thrown, the counter <code>written</code> is incremented by
455 <DT><B>Parameters:</B><DD><CODE>v</CODE> - a <code>boolean</code> value to be written.
457 <DD><CODE><A HREF="../../java/io/IOException.html" title="class in java.io">IOException</A></CODE> - if an I/O error occurs.<DT><B>See Also:</B><DD><CODE>FilterOutputStream.out</CODE></DL>
462 <A NAME="writeByte(int)"><!-- --></A><H3>
465 public final void <B>writeByte</B>(int v)
466 throws <A HREF="../../java/io/IOException.html" title="class in java.io">IOException</A></PRE>
468 <DD>Writes out a <code>byte</code> to the underlying output stream as
469 a 1-byte value. If no exception is thrown, the counter
470 <code>written</code> is incremented by <code>1</code>.
473 <DT><B>Parameters:</B><DD><CODE>v</CODE> - a <code>byte</code> value to be written.
475 <DD><CODE><A HREF="../../java/io/IOException.html" title="class in java.io">IOException</A></CODE> - if an I/O error occurs.<DT><B>See Also:</B><DD><CODE>FilterOutputStream.out</CODE></DL>
480 <A NAME="writeShort(int)"><!-- --></A><H3>
483 public final void <B>writeShort</B>(int v)
484 throws <A HREF="../../java/io/IOException.html" title="class in java.io">IOException</A></PRE>
486 <DD>Writes a <code>short</code> to the underlying output stream as two
487 bytes, high byte first. If no exception is thrown, the counter
488 <code>written</code> is incremented by <code>2</code>.
491 <DT><B>Parameters:</B><DD><CODE>v</CODE> - a <code>short</code> to be written.
493 <DD><CODE><A HREF="../../java/io/IOException.html" title="class in java.io">IOException</A></CODE> - if an I/O error occurs.<DT><B>See Also:</B><DD><CODE>FilterOutputStream.out</CODE></DL>
498 <A NAME="writeChar(int)"><!-- --></A><H3>
501 public final void <B>writeChar</B>(int v)
502 throws <A HREF="../../java/io/IOException.html" title="class in java.io">IOException</A></PRE>
504 <DD>Writes a <code>char</code> to the underlying output stream as a
505 2-byte value, high byte first. If no exception is thrown, the
506 counter <code>written</code> is incremented by <code>2</code>.
509 <DT><B>Parameters:</B><DD><CODE>v</CODE> - a <code>char</code> value to be written.
511 <DD><CODE><A HREF="../../java/io/IOException.html" title="class in java.io">IOException</A></CODE> - if an I/O error occurs.<DT><B>See Also:</B><DD><CODE>FilterOutputStream.out</CODE></DL>
516 <A NAME="writeInt(int)"><!-- --></A><H3>
519 public final void <B>writeInt</B>(int v)
520 throws <A HREF="../../java/io/IOException.html" title="class in java.io">IOException</A></PRE>
522 <DD>Writes an <code>int</code> to the underlying output stream as four
523 bytes, high byte first. If no exception is thrown, the counter
524 <code>written</code> is incremented by <code>4</code>.
527 <DT><B>Parameters:</B><DD><CODE>v</CODE> - an <code>int</code> to be written.
529 <DD><CODE><A HREF="../../java/io/IOException.html" title="class in java.io">IOException</A></CODE> - if an I/O error occurs.<DT><B>See Also:</B><DD><CODE>FilterOutputStream.out</CODE></DL>
534 <A NAME="writeFloat(float)"><!-- --></A><H3>
537 public final void <B>writeFloat</B>(float v)
538 throws <A HREF="../../java/io/IOException.html" title="class in java.io">IOException</A></PRE>
540 <DD>Converts the float argument to an <code>int</code> using the
541 <code>floatToIntBits</code> method in class <code>Float</code>,
542 and then writes that <code>int</code> value to the underlying
543 output stream as a 4-byte quantity, high byte first. If no
544 exception is thrown, the counter <code>written</code> is
545 incremented by <code>4</code>.
548 <DT><B>Parameters:</B><DD><CODE>v</CODE> - a <code>float</code> value to be written.
550 <DD><CODE><A HREF="../../java/io/IOException.html" title="class in java.io">IOException</A></CODE> - if an I/O error occurs.<DT><B>See Also:</B><DD><CODE>FilterOutputStream.out</CODE>,
551 <A HREF="../../java/lang/Float.html#floatToIntBits(float)"><CODE>Float.floatToIntBits(float)</CODE></A></DL>
556 <A NAME="size()"><!-- --></A><H3>
559 public final int <B>size</B>()</PRE>
561 <DD>Returns the current value of the counter <code>written</code>,
562 the number of bytes written to this data output stream so far.
563 If the counter overflows, it will be wrapped to Integer.MAX_VALUE.
567 <DT><B>Returns:</B><DD>the value of the <code>written</code> field.<DT><B>See Also:</B><DD><A HREF="../../java/io/DataOutputStream.html#written"><CODE>written</CODE></A></DL>
572 <A NAME="writeChars(java.lang.String)"><!-- --></A><H3>
575 public final void <B>writeChars</B>(<A HREF="../../java/lang/String.html" title="class in java.lang">String</A> value)
576 throws <A HREF="../../java/io/IOException.html" title="class in java.io">IOException</A></PRE>
581 <DD><CODE><A HREF="../../java/io/IOException.html" title="class in java.io">IOException</A></CODE></DL>
584 <!-- ========= END OF CLASS DATA ========= -->
588 <!-- ======= START OF BOTTOM NAVBAR ====== -->
589 <A NAME="navbar_bottom"><!-- --></A>
590 <A HREF="#skip-navbar_bottom" title="Skip navigation links"></A>
591 <TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
593 <TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
594 <A NAME="navbar_bottom_firstrow"><!-- --></A>
595 <TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
596 <TR ALIGN="center" VALIGN="top">
597 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD>
598 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD>
599 <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD>
600 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD>
601 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD>
602 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD>
603 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD>
607 <TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
613 <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
614 <A HREF="../../java/io/DataInputStream.html" title="class in java.io"><B>PREV CLASS</B></A>
615 <A HREF="../../java/io/File.html" title="class in java.io"><B>NEXT CLASS</B></A></FONT></TD>
616 <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
617 <A HREF="../../index.html?java/io/DataOutputStream.html" target="_top"><B>FRAMES</B></A>
618 <A HREF="DataOutputStream.html" target="_top"><B>NO FRAMES</B></A>
619 <SCRIPT type="text/javascript">
622 document.writeln('<A HREF="../../allclasses-noframe.html"><B>All Classes</B></A>');
627 <A HREF="../../allclasses-noframe.html"><B>All Classes</B></A>
634 <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
635 SUMMARY: NESTED | <A HREF="#field_summary">FIELD</A> | <A HREF="#constructor_summary">CONSTR</A> | <A HREF="#method_summary">METHOD</A></FONT></TD>
636 <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
637 DETAIL: <A HREF="#field_detail">FIELD</A> | <A HREF="#constructor_detail">CONSTR</A> | <A HREF="#method_detail">METHOD</A></FONT></TD>
640 <A NAME="skip-navbar_bottom"></A>
641 <!-- ======== END OF BOTTOM NAVBAR ======= -->