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-google-internal) on Mon Jan 04 20:47:59 PST 2010 --> 6 <TITLE> 7 ByteArrayDataOutput (Guava Libraries 2010.01.04) 8 </TITLE> 9 10 <META NAME="date" CONTENT="2010-01-04"> 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="ByteArrayDataOutput (Guava Libraries 2010.01.04)"; 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> </TD> 41 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD> 42 <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD> 43 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="class-use/ByteArrayDataOutput.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A> </TD> 44 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD> 45 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD> 46 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD> 47 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD> 48 </TR> 49 </TABLE> 50 </TD> 51 <TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM> 52 </EM> 53 </TD> 54 </TR> 55 56 <TR> 57 <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> 58 <A HREF="../../../../com/google/common/io/ByteArrayDataInput.html" title="interface in com.google.common.io"><B>PREV CLASS</B></A> 59 <A HREF="../../../../com/google/common/io/ByteProcessor.html" title="interface in com.google.common.io"><B>NEXT CLASS</B></A></FONT></TD> 60 <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> 61 <A HREF="../../../../index.html?com/google/common/io/ByteArrayDataOutput.html" target="_top"><B>FRAMES</B></A> 62 <A HREF="ByteArrayDataOutput.html" target="_top"><B>NO FRAMES</B></A> 63 <SCRIPT type="text/javascript"> 64 <!-- 65 if(window==top) { 66 document.writeln('<A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A>'); 67 } 68 //--> 69 </SCRIPT> 70 <NOSCRIPT> 71 <A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A> 72 </NOSCRIPT> 73 74 75 </FONT></TD> 76 </TR> 77 <TR> 78 <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> 79 SUMMARY: NESTED | FIELD | CONSTR | <A HREF="#method_summary">METHOD</A></FONT></TD> 80 <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> 81 DETAIL: FIELD | CONSTR | <A HREF="#method_detail">METHOD</A></FONT></TD> 82 </TR> 83 </TABLE> 84 <A NAME="skip-navbar_top"></A> 85 <!-- ========= END OF TOP NAVBAR ========= --> 86 87 <HR> 88 <!-- ======== START OF CLASS DATA ======== --> 89 <H2> 90 <FONT SIZE="-1"> 91 com.google.common.io</FONT> 92 <BR> 93 Interface ByteArrayDataOutput</H2> 94 <DL> 95 <DT><B>All Superinterfaces:</B> <DD><A HREF="http://java.sun.com/javase/6/docs/api/java/io/DataOutput.html?is-external=true" title="class or interface in java.io">DataOutput</A></DD> 96 </DL> 97 <HR> 98 <DL> 99 <DT><PRE>public interface <B>ByteArrayDataOutput</B><DT>extends <A HREF="http://java.sun.com/javase/6/docs/api/java/io/DataOutput.html?is-external=true" title="class or interface in java.io">DataOutput</A></DL> 100 </PRE> 101 102 <P> 103 An extension of <code>DataOutput</code> for writing to in-memory byte arrays; its 104 methods offer identical functionality but do not throw <A HREF="http://java.sun.com/javase/6/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io"><CODE>IOException</CODE></A>. 105 <P> 106 107 <P> 108 <DL> 109 <DT><B>Since:</B></DT> 110 <DD>2009.09.15 <b>tentative</b></DD> 111 <DT><B>Author:</B></DT> 112 <DD>Jayaprabhakar Kadarkarai</DD> 113 </DL> 114 <HR> 115 116 <P> 117 118 <!-- ========== METHOD SUMMARY =========== --> 119 120 <A NAME="method_summary"><!-- --></A> 121 <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> 122 <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> 123 <TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2"> 124 <B>Method Summary</B></FONT></TH> 125 </TR> 126 <TR BGCOLOR="white" CLASS="TableRowColor"> 127 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> 128 <CODE> byte[]</CODE></FONT></TD> 129 <TD><CODE><B><A HREF="../../../../com/google/common/io/ByteArrayDataOutput.html#toByteArray()">toByteArray</A></B>()</CODE> 130 131 <BR> 132 Returns the contents that have been written to this instance, 133 as a byte array.</TD> 134 </TR> 135 <TR BGCOLOR="white" CLASS="TableRowColor"> 136 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> 137 <CODE> void</CODE></FONT></TD> 138 <TD><CODE><B><A HREF="../../../../com/google/common/io/ByteArrayDataOutput.html#write(byte[])">write</A></B>(byte[] b)</CODE> 139 140 <BR> 141 </TD> 142 </TR> 143 <TR BGCOLOR="white" CLASS="TableRowColor"> 144 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> 145 <CODE> void</CODE></FONT></TD> 146 <TD><CODE><B><A HREF="../../../../com/google/common/io/ByteArrayDataOutput.html#write(byte[], int, int)">write</A></B>(byte[] b, 147 int off, 148 int len)</CODE> 149 150 <BR> 151 </TD> 152 </TR> 153 <TR BGCOLOR="white" CLASS="TableRowColor"> 154 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> 155 <CODE> void</CODE></FONT></TD> 156 <TD><CODE><B><A HREF="../../../../com/google/common/io/ByteArrayDataOutput.html#write(int)">write</A></B>(int b)</CODE> 157 158 <BR> 159 </TD> 160 </TR> 161 <TR BGCOLOR="white" CLASS="TableRowColor"> 162 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> 163 <CODE> void</CODE></FONT></TD> 164 <TD><CODE><B><A HREF="../../../../com/google/common/io/ByteArrayDataOutput.html#writeBoolean(boolean)">writeBoolean</A></B>(boolean v)</CODE> 165 166 <BR> 167 </TD> 168 </TR> 169 <TR BGCOLOR="white" CLASS="TableRowColor"> 170 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> 171 <CODE> void</CODE></FONT></TD> 172 <TD><CODE><B><A HREF="../../../../com/google/common/io/ByteArrayDataOutput.html#writeByte(int)">writeByte</A></B>(int v)</CODE> 173 174 <BR> 175 </TD> 176 </TR> 177 <TR BGCOLOR="white" CLASS="TableRowColor"> 178 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> 179 <CODE> void</CODE></FONT></TD> 180 <TD><CODE><B><A HREF="../../../../com/google/common/io/ByteArrayDataOutput.html#writeBytes(java.lang.String)">writeBytes</A></B>(<A HREF="http://java.sun.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A> s)</CODE> 181 182 <BR> 183 <B>Deprecated.</B> <I>This method is dangerous as it discards the high byte of 184 every character. For UTF-8, use <code>write(s.getBytes(Charsets.UTF_8))</code>.</I></TD> 185 </TR> 186 <TR BGCOLOR="white" CLASS="TableRowColor"> 187 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> 188 <CODE> void</CODE></FONT></TD> 189 <TD><CODE><B><A HREF="../../../../com/google/common/io/ByteArrayDataOutput.html#writeChar(int)">writeChar</A></B>(int v)</CODE> 190 191 <BR> 192 </TD> 193 </TR> 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="../../../../com/google/common/io/ByteArrayDataOutput.html#writeChars(java.lang.String)">writeChars</A></B>(<A HREF="http://java.sun.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A> s)</CODE> 198 199 <BR> 200 </TD> 201 </TR> 202 <TR BGCOLOR="white" CLASS="TableRowColor"> 203 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> 204 <CODE> void</CODE></FONT></TD> 205 <TD><CODE><B><A HREF="../../../../com/google/common/io/ByteArrayDataOutput.html#writeDouble(double)">writeDouble</A></B>(double v)</CODE> 206 207 <BR> 208 </TD> 209 </TR> 210 <TR BGCOLOR="white" CLASS="TableRowColor"> 211 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> 212 <CODE> void</CODE></FONT></TD> 213 <TD><CODE><B><A HREF="../../../../com/google/common/io/ByteArrayDataOutput.html#writeFloat(float)">writeFloat</A></B>(float v)</CODE> 214 215 <BR> 216 </TD> 217 </TR> 218 <TR BGCOLOR="white" CLASS="TableRowColor"> 219 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> 220 <CODE> void</CODE></FONT></TD> 221 <TD><CODE><B><A HREF="../../../../com/google/common/io/ByteArrayDataOutput.html#writeInt(int)">writeInt</A></B>(int v)</CODE> 222 223 <BR> 224 </TD> 225 </TR> 226 <TR BGCOLOR="white" CLASS="TableRowColor"> 227 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> 228 <CODE> void</CODE></FONT></TD> 229 <TD><CODE><B><A HREF="../../../../com/google/common/io/ByteArrayDataOutput.html#writeLong(long)">writeLong</A></B>(long v)</CODE> 230 231 <BR> 232 </TD> 233 </TR> 234 <TR BGCOLOR="white" CLASS="TableRowColor"> 235 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> 236 <CODE> void</CODE></FONT></TD> 237 <TD><CODE><B><A HREF="../../../../com/google/common/io/ByteArrayDataOutput.html#writeShort(int)">writeShort</A></B>(int v)</CODE> 238 239 <BR> 240 </TD> 241 </TR> 242 <TR BGCOLOR="white" CLASS="TableRowColor"> 243 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> 244 <CODE> void</CODE></FONT></TD> 245 <TD><CODE><B><A HREF="../../../../com/google/common/io/ByteArrayDataOutput.html#writeUTF(java.lang.String)">writeUTF</A></B>(<A HREF="http://java.sun.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A> s)</CODE> 246 247 <BR> 248 </TD> 249 </TR> 250 </TABLE> 251 252 <P> 253 254 <!-- ============ METHOD DETAIL ========== --> 255 256 <A NAME="method_detail"><!-- --></A> 257 <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> 258 <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> 259 <TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2"> 260 <B>Method Detail</B></FONT></TH> 261 </TR> 262 </TABLE> 263 264 <A NAME="write(int)"><!-- --></A><H3> 265 write</H3> 266 <PRE> 267 void <B>write</B>(int b)</PRE> 268 <DL> 269 <DD><DL> 270 <DT><B>Specified by:</B><DD><CODE><A HREF="http://java.sun.com/javase/6/docs/api/java/io/DataOutput.html?is-external=true#write(int)" title="class or interface in java.io">write</A></CODE> in interface <CODE><A HREF="http://java.sun.com/javase/6/docs/api/java/io/DataOutput.html?is-external=true" title="class or interface in java.io">DataOutput</A></CODE></DL> 271 </DD> 272 <DD><DL> 273 </DL> 274 </DD> 275 </DL> 276 <HR> 277 278 <A NAME="write(byte[])"><!-- --></A><H3> 279 write</H3> 280 <PRE> 281 void <B>write</B>(byte[] b)</PRE> 282 <DL> 283 <DD><DL> 284 <DT><B>Specified by:</B><DD><CODE><A HREF="http://java.sun.com/javase/6/docs/api/java/io/DataOutput.html?is-external=true#write(byte[])" title="class or interface in java.io">write</A></CODE> in interface <CODE><A HREF="http://java.sun.com/javase/6/docs/api/java/io/DataOutput.html?is-external=true" title="class or interface in java.io">DataOutput</A></CODE></DL> 285 </DD> 286 <DD><DL> 287 </DL> 288 </DD> 289 </DL> 290 <HR> 291 292 <A NAME="write(byte[], int, int)"><!-- --></A><H3> 293 write</H3> 294 <PRE> 295 void <B>write</B>(byte[] b, 296 int off, 297 int len)</PRE> 298 <DL> 299 <DD><DL> 300 <DT><B>Specified by:</B><DD><CODE><A HREF="http://java.sun.com/javase/6/docs/api/java/io/DataOutput.html?is-external=true#write(byte[], int, int)" title="class or interface in java.io">write</A></CODE> in interface <CODE><A HREF="http://java.sun.com/javase/6/docs/api/java/io/DataOutput.html?is-external=true" title="class or interface in java.io">DataOutput</A></CODE></DL> 301 </DD> 302 <DD><DL> 303 </DL> 304 </DD> 305 </DL> 306 <HR> 307 308 <A NAME="writeBoolean(boolean)"><!-- --></A><H3> 309 writeBoolean</H3> 310 <PRE> 311 void <B>writeBoolean</B>(boolean v)</PRE> 312 <DL> 313 <DD><DL> 314 <DT><B>Specified by:</B><DD><CODE><A HREF="http://java.sun.com/javase/6/docs/api/java/io/DataOutput.html?is-external=true#writeBoolean(boolean)" title="class or interface in java.io">writeBoolean</A></CODE> in interface <CODE><A HREF="http://java.sun.com/javase/6/docs/api/java/io/DataOutput.html?is-external=true" title="class or interface in java.io">DataOutput</A></CODE></DL> 315 </DD> 316 <DD><DL> 317 </DL> 318 </DD> 319 </DL> 320 <HR> 321 322 <A NAME="writeByte(int)"><!-- --></A><H3> 323 writeByte</H3> 324 <PRE> 325 void <B>writeByte</B>(int v)</PRE> 326 <DL> 327 <DD><DL> 328 <DT><B>Specified by:</B><DD><CODE><A HREF="http://java.sun.com/javase/6/docs/api/java/io/DataOutput.html?is-external=true#writeByte(int)" title="class or interface in java.io">writeByte</A></CODE> in interface <CODE><A HREF="http://java.sun.com/javase/6/docs/api/java/io/DataOutput.html?is-external=true" title="class or interface in java.io">DataOutput</A></CODE></DL> 329 </DD> 330 <DD><DL> 331 </DL> 332 </DD> 333 </DL> 334 <HR> 335 336 <A NAME="writeShort(int)"><!-- --></A><H3> 337 writeShort</H3> 338 <PRE> 339 void <B>writeShort</B>(int v)</PRE> 340 <DL> 341 <DD><DL> 342 <DT><B>Specified by:</B><DD><CODE><A HREF="http://java.sun.com/javase/6/docs/api/java/io/DataOutput.html?is-external=true#writeShort(int)" title="class or interface in java.io">writeShort</A></CODE> in interface <CODE><A HREF="http://java.sun.com/javase/6/docs/api/java/io/DataOutput.html?is-external=true" title="class or interface in java.io">DataOutput</A></CODE></DL> 343 </DD> 344 <DD><DL> 345 </DL> 346 </DD> 347 </DL> 348 <HR> 349 350 <A NAME="writeChar(int)"><!-- --></A><H3> 351 writeChar</H3> 352 <PRE> 353 void <B>writeChar</B>(int v)</PRE> 354 <DL> 355 <DD><DL> 356 <DT><B>Specified by:</B><DD><CODE><A HREF="http://java.sun.com/javase/6/docs/api/java/io/DataOutput.html?is-external=true#writeChar(int)" title="class or interface in java.io">writeChar</A></CODE> in interface <CODE><A HREF="http://java.sun.com/javase/6/docs/api/java/io/DataOutput.html?is-external=true" title="class or interface in java.io">DataOutput</A></CODE></DL> 357 </DD> 358 <DD><DL> 359 </DL> 360 </DD> 361 </DL> 362 <HR> 363 364 <A NAME="writeInt(int)"><!-- --></A><H3> 365 writeInt</H3> 366 <PRE> 367 void <B>writeInt</B>(int v)</PRE> 368 <DL> 369 <DD><DL> 370 <DT><B>Specified by:</B><DD><CODE><A HREF="http://java.sun.com/javase/6/docs/api/java/io/DataOutput.html?is-external=true#writeInt(int)" title="class or interface in java.io">writeInt</A></CODE> in interface <CODE><A HREF="http://java.sun.com/javase/6/docs/api/java/io/DataOutput.html?is-external=true" title="class or interface in java.io">DataOutput</A></CODE></DL> 371 </DD> 372 <DD><DL> 373 </DL> 374 </DD> 375 </DL> 376 <HR> 377 378 <A NAME="writeLong(long)"><!-- --></A><H3> 379 writeLong</H3> 380 <PRE> 381 void <B>writeLong</B>(long v)</PRE> 382 <DL> 383 <DD><DL> 384 <DT><B>Specified by:</B><DD><CODE><A HREF="http://java.sun.com/javase/6/docs/api/java/io/DataOutput.html?is-external=true#writeLong(long)" title="class or interface in java.io">writeLong</A></CODE> in interface <CODE><A HREF="http://java.sun.com/javase/6/docs/api/java/io/DataOutput.html?is-external=true" title="class or interface in java.io">DataOutput</A></CODE></DL> 385 </DD> 386 <DD><DL> 387 </DL> 388 </DD> 389 </DL> 390 <HR> 391 392 <A NAME="writeFloat(float)"><!-- --></A><H3> 393 writeFloat</H3> 394 <PRE> 395 void <B>writeFloat</B>(float v)</PRE> 396 <DL> 397 <DD><DL> 398 <DT><B>Specified by:</B><DD><CODE><A HREF="http://java.sun.com/javase/6/docs/api/java/io/DataOutput.html?is-external=true#writeFloat(float)" title="class or interface in java.io">writeFloat</A></CODE> in interface <CODE><A HREF="http://java.sun.com/javase/6/docs/api/java/io/DataOutput.html?is-external=true" title="class or interface in java.io">DataOutput</A></CODE></DL> 399 </DD> 400 <DD><DL> 401 </DL> 402 </DD> 403 </DL> 404 <HR> 405 406 <A NAME="writeDouble(double)"><!-- --></A><H3> 407 writeDouble</H3> 408 <PRE> 409 void <B>writeDouble</B>(double v)</PRE> 410 <DL> 411 <DD><DL> 412 <DT><B>Specified by:</B><DD><CODE><A HREF="http://java.sun.com/javase/6/docs/api/java/io/DataOutput.html?is-external=true#writeDouble(double)" title="class or interface in java.io">writeDouble</A></CODE> in interface <CODE><A HREF="http://java.sun.com/javase/6/docs/api/java/io/DataOutput.html?is-external=true" title="class or interface in java.io">DataOutput</A></CODE></DL> 413 </DD> 414 <DD><DL> 415 </DL> 416 </DD> 417 </DL> 418 <HR> 419 420 <A NAME="writeChars(java.lang.String)"><!-- --></A><H3> 421 writeChars</H3> 422 <PRE> 423 void <B>writeChars</B>(<A HREF="http://java.sun.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A> s)</PRE> 424 <DL> 425 <DD><DL> 426 <DT><B>Specified by:</B><DD><CODE><A HREF="http://java.sun.com/javase/6/docs/api/java/io/DataOutput.html?is-external=true#writeChars(java.lang.String)" title="class or interface in java.io">writeChars</A></CODE> in interface <CODE><A HREF="http://java.sun.com/javase/6/docs/api/java/io/DataOutput.html?is-external=true" title="class or interface in java.io">DataOutput</A></CODE></DL> 427 </DD> 428 <DD><DL> 429 </DL> 430 </DD> 431 </DL> 432 <HR> 433 434 <A NAME="writeUTF(java.lang.String)"><!-- --></A><H3> 435 writeUTF</H3> 436 <PRE> 437 void <B>writeUTF</B>(<A HREF="http://java.sun.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A> s)</PRE> 438 <DL> 439 <DD><DL> 440 <DT><B>Specified by:</B><DD><CODE><A HREF="http://java.sun.com/javase/6/docs/api/java/io/DataOutput.html?is-external=true#writeUTF(java.lang.String)" title="class or interface in java.io">writeUTF</A></CODE> in interface <CODE><A HREF="http://java.sun.com/javase/6/docs/api/java/io/DataOutput.html?is-external=true" title="class or interface in java.io">DataOutput</A></CODE></DL> 441 </DD> 442 <DD><DL> 443 </DL> 444 </DD> 445 </DL> 446 <HR> 447 448 <A NAME="writeBytes(java.lang.String)"><!-- --></A><H3> 449 writeBytes</H3> 450 <PRE> 451 <FONT SIZE="-1"><A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Deprecated.html?is-external=true" title="class or interface in java.lang">@Deprecated</A> 452 </FONT>void <B>writeBytes</B>(<A HREF="http://java.sun.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A> s)</PRE> 453 <DL> 454 <DD><B>Deprecated.</B> <I>This method is dangerous as it discards the high byte of 455 every character. For UTF-8, use <code>write(s.getBytes(Charsets.UTF_8))</code>.</I> 456 <P> 457 <DD><DL> 458 <DT><B>Specified by:</B><DD><CODE><A HREF="http://java.sun.com/javase/6/docs/api/java/io/DataOutput.html?is-external=true#writeBytes(java.lang.String)" title="class or interface in java.io">writeBytes</A></CODE> in interface <CODE><A HREF="http://java.sun.com/javase/6/docs/api/java/io/DataOutput.html?is-external=true" title="class or interface in java.io">DataOutput</A></CODE></DL> 459 </DD> 460 <DD><DL> 461 </DL> 462 </DD> 463 </DL> 464 <HR> 465 466 <A NAME="toByteArray()"><!-- --></A><H3> 467 toByteArray</H3> 468 <PRE> 469 byte[] <B>toByteArray</B>()</PRE> 470 <DL> 471 <DD>Returns the contents that have been written to this instance, 472 as a byte array. 473 <P> 474 <DD><DL> 475 </DL> 476 </DD> 477 <DD><DL> 478 </DL> 479 </DD> 480 </DL> 481 <!-- ========= END OF CLASS DATA ========= --> 482 <HR> 483 484 485 <!-- ======= START OF BOTTOM NAVBAR ====== --> 486 <A NAME="navbar_bottom"><!-- --></A> 487 <A HREF="#skip-navbar_bottom" title="Skip navigation links"></A> 488 <TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY=""> 489 <TR> 490 <TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> 491 <A NAME="navbar_bottom_firstrow"><!-- --></A> 492 <TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY=""> 493 <TR ALIGN="center" VALIGN="top"> 494 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD> 495 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD> 496 <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD> 497 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="class-use/ByteArrayDataOutput.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A> </TD> 498 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD> 499 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD> 500 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD> 501 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD> 502 </TR> 503 </TABLE> 504 </TD> 505 <TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM> 506 </EM> 507 </TD> 508 </TR> 509 510 <TR> 511 <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> 512 <A HREF="../../../../com/google/common/io/ByteArrayDataInput.html" title="interface in com.google.common.io"><B>PREV CLASS</B></A> 513 <A HREF="../../../../com/google/common/io/ByteProcessor.html" title="interface in com.google.common.io"><B>NEXT CLASS</B></A></FONT></TD> 514 <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> 515 <A HREF="../../../../index.html?com/google/common/io/ByteArrayDataOutput.html" target="_top"><B>FRAMES</B></A> 516 <A HREF="ByteArrayDataOutput.html" target="_top"><B>NO FRAMES</B></A> 517 <SCRIPT type="text/javascript"> 518 <!-- 519 if(window==top) { 520 document.writeln('<A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A>'); 521 } 522 //--> 523 </SCRIPT> 524 <NOSCRIPT> 525 <A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A> 526 </NOSCRIPT> 527 528 529 </FONT></TD> 530 </TR> 531 <TR> 532 <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> 533 SUMMARY: NESTED | FIELD | CONSTR | <A HREF="#method_summary">METHOD</A></FONT></TD> 534 <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> 535 DETAIL: FIELD | CONSTR | <A HREF="#method_detail">METHOD</A></FONT></TD> 536 </TR> 537 </TABLE> 538 <A NAME="skip-navbar_bottom"></A> 539 <!-- ======== END OF BOTTOM NAVBAR ======= --> 540 541 <HR> 542 543 </BODY> 544 </HTML> 545