source: proiecte/HadoopJUnit/hadoop-0.20.1/docs/api/org/apache/hadoop/io/DataOutputBuffer.html @ 120

Last change on this file since 120 was 120, checked in by (none), 14 years ago

Added the mail files for the Hadoop JUNit Project

  • Property svn:executable set to *
File size: 23.9 KB
Line 
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_07) on Tue Sep 01 20:56:52 UTC 2009 -->
6<TITLE>
7DataOutputBuffer (Hadoop 0.20.1 API)
8</TITLE>
9
10<META NAME="date" CONTENT="2009-09-01">
11
12<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../../stylesheet.css" TITLE="Style">
13
14<SCRIPT type="text/javascript">
15function windowTitle()
16{
17    if (location.href.indexOf('is-external=true') == -1) {
18        parent.document.title="DataOutputBuffer (Hadoop 0.20.1 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/DataOutputBuffer.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</EM>
53</TD>
54</TR>
55
56<TR>
57<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
58&nbsp;<A HREF="../../../../org/apache/hadoop/io/DataInputBuffer.html" title="class in org.apache.hadoop.io"><B>PREV CLASS</B></A>&nbsp;
59&nbsp;<A HREF="../../../../org/apache/hadoop/io/DefaultStringifier.html" title="class in org.apache.hadoop.io"><B>NEXT CLASS</B></A></FONT></TD>
60<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
61  <A HREF="../../../../index.html?org/apache/hadoop/io/DataOutputBuffer.html" target="_top"><B>FRAMES</B></A>  &nbsp;
62&nbsp;<A HREF="DataOutputBuffer.html" target="_top"><B>NO FRAMES</B></A>  &nbsp;
63&nbsp;<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:&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>
80<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
81DETAIL:&nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_detail">CONSTR</A>&nbsp;|&nbsp;<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">
91org.apache.hadoop.io</FONT>
92<BR>
93Class DataOutputBuffer</H2>
94<PRE>
95<A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">java.lang.Object</A>
96  <IMG SRC="../../../../resources/inherit.gif" ALT="extended by "><A HREF="http://java.sun.com/javase/6/docs/api/java/io/OutputStream.html?is-external=true" title="class or interface in java.io">java.io.OutputStream</A>
97      <IMG SRC="../../../../resources/inherit.gif" ALT="extended by "><A HREF="http://java.sun.com/javase/6/docs/api/java/io/FilterOutputStream.html?is-external=true" title="class or interface in java.io">java.io.FilterOutputStream</A>
98          <IMG SRC="../../../../resources/inherit.gif" ALT="extended by "><A HREF="http://java.sun.com/javase/6/docs/api/java/io/DataOutputStream.html?is-external=true" title="class or interface in java.io">java.io.DataOutputStream</A>
99              <IMG SRC="../../../../resources/inherit.gif" ALT="extended by "><B>org.apache.hadoop.io.DataOutputBuffer</B>
100</PRE>
101<DL>
102<DT><B>All Implemented Interfaces:</B> <DD><A HREF="http://java.sun.com/javase/6/docs/api/java/io/Closeable.html?is-external=true" title="class or interface in java.io">Closeable</A>, <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>, <A HREF="http://java.sun.com/javase/6/docs/api/java/io/Flushable.html?is-external=true" title="class or interface in java.io">Flushable</A></DD>
103</DL>
104<HR>
105<DL>
106<DT><PRE>public class <B>DataOutputBuffer</B><DT>extends <A HREF="http://java.sun.com/javase/6/docs/api/java/io/DataOutputStream.html?is-external=true" title="class or interface in java.io">DataOutputStream</A></DL>
107</PRE>
108
109<P>
110A reusable <A HREF="http://java.sun.com/javase/6/docs/api/java/io/DataOutput.html?is-external=true" title="class or interface in java.io"><CODE>DataOutput</CODE></A> implementation that writes to an in-memory
111 buffer.
112
113 <p>This saves memory over creating a new DataOutputStream and
114 ByteArrayOutputStream each time data is written.
115
116 <p>Typical usage is something like the following:<pre>
117
118 DataOutputBuffer buffer = new DataOutputBuffer();
119 while (... loop condition ...) {
120   buffer.reset();
121   ... write buffer using DataOutput methods ...
122   byte[] data = buffer.getData();
123   int dataLength = buffer.getLength();
124   ... write data to its ultimate destination ...
125 }
126 </pre>
127<P>
128
129<P>
130<HR>
131
132<P>
133<!-- =========== FIELD SUMMARY =========== -->
134
135<A NAME="field_summary"><!-- --></A>
136<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
137<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
138<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
139<B>Field Summary</B></FONT></TH>
140</TR>
141</TABLE>
142&nbsp;<A NAME="fields_inherited_from_class_java.io.DataOutputStream"><!-- --></A>
143<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
144<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
145<TH ALIGN="left"><B>Fields inherited from class java.io.<A HREF="http://java.sun.com/javase/6/docs/api/java/io/DataOutputStream.html?is-external=true" title="class or interface in java.io">DataOutputStream</A></B></TH>
146</TR>
147<TR BGCOLOR="white" CLASS="TableRowColor">
148<TD><CODE><A HREF="http://java.sun.com/javase/6/docs/api/java/io/DataOutputStream.html?is-external=true#written" title="class or interface in java.io">written</A></CODE></TD>
149</TR>
150</TABLE>
151&nbsp;<A NAME="fields_inherited_from_class_java.io.FilterOutputStream"><!-- --></A>
152<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
153<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
154<TH ALIGN="left"><B>Fields inherited from class java.io.<A HREF="http://java.sun.com/javase/6/docs/api/java/io/FilterOutputStream.html?is-external=true" title="class or interface in java.io">FilterOutputStream</A></B></TH>
155</TR>
156<TR BGCOLOR="white" CLASS="TableRowColor">
157<TD><CODE><A HREF="http://java.sun.com/javase/6/docs/api/java/io/FilterOutputStream.html?is-external=true#out" title="class or interface in java.io">out</A></CODE></TD>
158</TR>
159</TABLE>
160&nbsp;
161<!-- ======== CONSTRUCTOR SUMMARY ======== -->
162
163<A NAME="constructor_summary"><!-- --></A>
164<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
165<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
166<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
167<B>Constructor Summary</B></FONT></TH>
168</TR>
169<TR BGCOLOR="white" CLASS="TableRowColor">
170<TD><CODE><B><A HREF="../../../../org/apache/hadoop/io/DataOutputBuffer.html#DataOutputBuffer()">DataOutputBuffer</A></B>()</CODE>
171
172<BR>
173&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Constructs a new empty buffer.</TD>
174</TR>
175<TR BGCOLOR="white" CLASS="TableRowColor">
176<TD><CODE><B><A HREF="../../../../org/apache/hadoop/io/DataOutputBuffer.html#DataOutputBuffer(int)">DataOutputBuffer</A></B>(int&nbsp;size)</CODE>
177
178<BR>
179&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
180</TR>
181</TABLE>
182&nbsp;
183<!-- ========== METHOD SUMMARY =========== -->
184
185<A NAME="method_summary"><!-- --></A>
186<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
187<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
188<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
189<B>Method Summary</B></FONT></TH>
190</TR>
191<TR BGCOLOR="white" CLASS="TableRowColor">
192<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
193<CODE>&nbsp;byte[]</CODE></FONT></TD>
194<TD><CODE><B><A HREF="../../../../org/apache/hadoop/io/DataOutputBuffer.html#getData()">getData</A></B>()</CODE>
195
196<BR>
197&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the current contents of the buffer.</TD>
198</TR>
199<TR BGCOLOR="white" CLASS="TableRowColor">
200<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
201<CODE>&nbsp;int</CODE></FONT></TD>
202<TD><CODE><B><A HREF="../../../../org/apache/hadoop/io/DataOutputBuffer.html#getLength()">getLength</A></B>()</CODE>
203
204<BR>
205&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the length of the valid data currently in the buffer.</TD>
206</TR>
207<TR BGCOLOR="white" CLASS="TableRowColor">
208<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
209<CODE>&nbsp;<A HREF="../../../../org/apache/hadoop/io/DataOutputBuffer.html" title="class in org.apache.hadoop.io">DataOutputBuffer</A></CODE></FONT></TD>
210<TD><CODE><B><A HREF="../../../../org/apache/hadoop/io/DataOutputBuffer.html#reset()">reset</A></B>()</CODE>
211
212<BR>
213&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Resets the buffer to empty.</TD>
214</TR>
215<TR BGCOLOR="white" CLASS="TableRowColor">
216<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
217<CODE>&nbsp;void</CODE></FONT></TD>
218<TD><CODE><B><A HREF="../../../../org/apache/hadoop/io/DataOutputBuffer.html#write(java.io.DataInput, int)">write</A></B>(<A HREF="http://java.sun.com/javase/6/docs/api/java/io/DataInput.html?is-external=true" title="class or interface in java.io">DataInput</A>&nbsp;in,
219      int&nbsp;length)</CODE>
220
221<BR>
222&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Writes bytes from a DataInput directly into the buffer.</TD>
223</TR>
224<TR BGCOLOR="white" CLASS="TableRowColor">
225<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
226<CODE>&nbsp;void</CODE></FONT></TD>
227<TD><CODE><B><A HREF="../../../../org/apache/hadoop/io/DataOutputBuffer.html#writeTo(java.io.OutputStream)">writeTo</A></B>(<A HREF="http://java.sun.com/javase/6/docs/api/java/io/OutputStream.html?is-external=true" title="class or interface in java.io">OutputStream</A>&nbsp;out)</CODE>
228
229<BR>
230&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Write to a file stream</TD>
231</TR>
232</TABLE>
233&nbsp;<A NAME="methods_inherited_from_class_java.io.DataOutputStream"><!-- --></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 class java.io.<A HREF="http://java.sun.com/javase/6/docs/api/java/io/DataOutputStream.html?is-external=true" title="class or interface in java.io">DataOutputStream</A></B></TH>
237</TR>
238<TR BGCOLOR="white" CLASS="TableRowColor">
239<TD><CODE><A HREF="http://java.sun.com/javase/6/docs/api/java/io/DataOutputStream.html?is-external=true#flush()" title="class or interface in java.io">flush</A>, <A HREF="http://java.sun.com/javase/6/docs/api/java/io/DataOutputStream.html?is-external=true#size()" title="class or interface in java.io">size</A>, <A HREF="http://java.sun.com/javase/6/docs/api/java/io/DataOutputStream.html?is-external=true#write(byte[], int, int)" title="class or interface in java.io">write</A>, <A HREF="http://java.sun.com/javase/6/docs/api/java/io/DataOutputStream.html?is-external=true#write(int)" title="class or interface in java.io">write</A>, <A HREF="http://java.sun.com/javase/6/docs/api/java/io/DataOutputStream.html?is-external=true#writeBoolean(boolean)" title="class or interface in java.io">writeBoolean</A>, <A HREF="http://java.sun.com/javase/6/docs/api/java/io/DataOutputStream.html?is-external=true#writeByte(int)" title="class or interface in java.io">writeByte</A>, <A HREF="http://java.sun.com/javase/6/docs/api/java/io/DataOutputStream.html?is-external=true#writeBytes(java.lang.String)" title="class or interface in java.io">writeBytes</A>, <A HREF="http://java.sun.com/javase/6/docs/api/java/io/DataOutputStream.html?is-external=true#writeChar(int)" title="class or interface in java.io">writeChar</A>, <A HREF="http://java.sun.com/javase/6/docs/api/java/io/DataOutputStream.html?is-external=true#writeChars(java.lang.String)" title="class or interface in java.io">writeChars</A>, <A HREF="http://java.sun.com/javase/6/docs/api/java/io/DataOutputStream.html?is-external=true#writeDouble(double)" title="class or interface in java.io">writeDouble</A>, <A HREF="http://java.sun.com/javase/6/docs/api/java/io/DataOutputStream.html?is-external=true#writeFloat(float)" title="class or interface in java.io">writeFloat</A>, <A HREF="http://java.sun.com/javase/6/docs/api/java/io/DataOutputStream.html?is-external=true#writeInt(int)" title="class or interface in java.io">writeInt</A>, <A HREF="http://java.sun.com/javase/6/docs/api/java/io/DataOutputStream.html?is-external=true#writeLong(long)" title="class or interface in java.io">writeLong</A>, <A HREF="http://java.sun.com/javase/6/docs/api/java/io/DataOutputStream.html?is-external=true#writeShort(int)" title="class or interface in java.io">writeShort</A>, <A HREF="http://java.sun.com/javase/6/docs/api/java/io/DataOutputStream.html?is-external=true#writeUTF(java.lang.String)" title="class or interface in java.io">writeUTF</A></CODE></TD>
240</TR>
241</TABLE>
242&nbsp;<A NAME="methods_inherited_from_class_java.io.FilterOutputStream"><!-- --></A>
243<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
244<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
245<TH ALIGN="left"><B>Methods inherited from class java.io.<A HREF="http://java.sun.com/javase/6/docs/api/java/io/FilterOutputStream.html?is-external=true" title="class or interface in java.io">FilterOutputStream</A></B></TH>
246</TR>
247<TR BGCOLOR="white" CLASS="TableRowColor">
248<TD><CODE><A HREF="http://java.sun.com/javase/6/docs/api/java/io/FilterOutputStream.html?is-external=true#close()" title="class or interface in java.io">close</A>, <A HREF="http://java.sun.com/javase/6/docs/api/java/io/FilterOutputStream.html?is-external=true#write(byte[])" title="class or interface in java.io">write</A></CODE></TD>
249</TR>
250</TABLE>
251&nbsp;<A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A>
252<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
253<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
254<TH ALIGN="left"><B>Methods inherited from class java.lang.<A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</A></B></TH>
255</TR>
256<TR BGCOLOR="white" CLASS="TableRowColor">
257<TD><CODE><A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Object.html?is-external=true#clone()" title="class or interface in java.lang">clone</A>, <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Object.html?is-external=true#equals(java.lang.Object)" title="class or interface in java.lang">equals</A>, <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Object.html?is-external=true#finalize()" title="class or interface in java.lang">finalize</A>, <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Object.html?is-external=true#getClass()" title="class or interface in java.lang">getClass</A>, <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Object.html?is-external=true#hashCode()" title="class or interface in java.lang">hashCode</A>, <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Object.html?is-external=true#notify()" title="class or interface in java.lang">notify</A>, <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Object.html?is-external=true#notifyAll()" title="class or interface in java.lang">notifyAll</A>, <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Object.html?is-external=true#toString()" title="class or interface in java.lang">toString</A>, <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Object.html?is-external=true#wait()" title="class or interface in java.lang">wait</A>, <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Object.html?is-external=true#wait(long)" title="class or interface in java.lang">wait</A>, <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Object.html?is-external=true#wait(long, int)" title="class or interface in java.lang">wait</A></CODE></TD>
258</TR>
259</TABLE>
260&nbsp;<A NAME="methods_inherited_from_class_java.io.DataOutput"><!-- --></A>
261<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
262<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
263<TH ALIGN="left"><B>Methods inherited from interface java.io.<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></B></TH>
264</TR>
265<TR BGCOLOR="white" CLASS="TableRowColor">
266<TD><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></TD>
267</TR>
268</TABLE>
269&nbsp;
270<P>
271
272<!-- ========= CONSTRUCTOR DETAIL ======== -->
273
274<A NAME="constructor_detail"><!-- --></A>
275<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
276<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
277<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
278<B>Constructor Detail</B></FONT></TH>
279</TR>
280</TABLE>
281
282<A NAME="DataOutputBuffer()"><!-- --></A><H3>
283DataOutputBuffer</H3>
284<PRE>
285public <B>DataOutputBuffer</B>()</PRE>
286<DL>
287<DD>Constructs a new empty buffer.
288<P>
289</DL>
290<HR>
291
292<A NAME="DataOutputBuffer(int)"><!-- --></A><H3>
293DataOutputBuffer</H3>
294<PRE>
295public <B>DataOutputBuffer</B>(int&nbsp;size)</PRE>
296<DL>
297</DL>
298
299<!-- ============ METHOD DETAIL ========== -->
300
301<A NAME="method_detail"><!-- --></A>
302<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
303<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
304<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
305<B>Method Detail</B></FONT></TH>
306</TR>
307</TABLE>
308
309<A NAME="getData()"><!-- --></A><H3>
310getData</H3>
311<PRE>
312public byte[] <B>getData</B>()</PRE>
313<DL>
314<DD>Returns the current contents of the buffer.
315  Data is only valid to <A HREF="../../../../org/apache/hadoop/io/DataOutputBuffer.html#getLength()"><CODE>getLength()</CODE></A>.
316<P>
317<DD><DL>
318</DL>
319</DD>
320</DL>
321<HR>
322
323<A NAME="getLength()"><!-- --></A><H3>
324getLength</H3>
325<PRE>
326public int <B>getLength</B>()</PRE>
327<DL>
328<DD>Returns the length of the valid data currently in the buffer.
329<P>
330<DD><DL>
331</DL>
332</DD>
333</DL>
334<HR>
335
336<A NAME="reset()"><!-- --></A><H3>
337reset</H3>
338<PRE>
339public <A HREF="../../../../org/apache/hadoop/io/DataOutputBuffer.html" title="class in org.apache.hadoop.io">DataOutputBuffer</A> <B>reset</B>()</PRE>
340<DL>
341<DD>Resets the buffer to empty.
342<P>
343<DD><DL>
344</DL>
345</DD>
346</DL>
347<HR>
348
349<A NAME="write(java.io.DataInput, int)"><!-- --></A><H3>
350write</H3>
351<PRE>
352public void <B>write</B>(<A HREF="http://java.sun.com/javase/6/docs/api/java/io/DataInput.html?is-external=true" title="class or interface in java.io">DataInput</A>&nbsp;in,
353                  int&nbsp;length)
354           throws <A HREF="http://java.sun.com/javase/6/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</A></PRE>
355<DL>
356<DD>Writes bytes from a DataInput directly into the buffer.
357<P>
358<DD><DL>
359
360<DT><B>Throws:</B>
361<DD><CODE><A HREF="http://java.sun.com/javase/6/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</A></CODE></DL>
362</DD>
363</DL>
364<HR>
365
366<A NAME="writeTo(java.io.OutputStream)"><!-- --></A><H3>
367writeTo</H3>
368<PRE>
369public void <B>writeTo</B>(<A HREF="http://java.sun.com/javase/6/docs/api/java/io/OutputStream.html?is-external=true" title="class or interface in java.io">OutputStream</A>&nbsp;out)
370             throws <A HREF="http://java.sun.com/javase/6/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</A></PRE>
371<DL>
372<DD>Write to a file stream
373<P>
374<DD><DL>
375
376<DT><B>Throws:</B>
377<DD><CODE><A HREF="http://java.sun.com/javase/6/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</A></CODE></DL>
378</DD>
379</DL>
380<!-- ========= END OF CLASS DATA ========= -->
381<HR>
382
383
384<!-- ======= START OF BOTTOM NAVBAR ====== -->
385<A NAME="navbar_bottom"><!-- --></A>
386<A HREF="#skip-navbar_bottom" title="Skip navigation links"></A>
387<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
388<TR>
389<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
390<A NAME="navbar_bottom_firstrow"><!-- --></A>
391<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
392  <TR ALIGN="center" VALIGN="top">
393  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
394  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
395  <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
396  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="class-use/DataOutputBuffer.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A>&nbsp;</TD>
397  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
398  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
399  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
400  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
401  </TR>
402</TABLE>
403</TD>
404<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
405</EM>
406</TD>
407</TR>
408
409<TR>
410<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
411&nbsp;<A HREF="../../../../org/apache/hadoop/io/DataInputBuffer.html" title="class in org.apache.hadoop.io"><B>PREV CLASS</B></A>&nbsp;
412&nbsp;<A HREF="../../../../org/apache/hadoop/io/DefaultStringifier.html" title="class in org.apache.hadoop.io"><B>NEXT CLASS</B></A></FONT></TD>
413<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
414  <A HREF="../../../../index.html?org/apache/hadoop/io/DataOutputBuffer.html" target="_top"><B>FRAMES</B></A>  &nbsp;
415&nbsp;<A HREF="DataOutputBuffer.html" target="_top"><B>NO FRAMES</B></A>  &nbsp;
416&nbsp;<SCRIPT type="text/javascript">
417  <!--
418  if(window==top) {
419    document.writeln('<A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A>');
420  }
421  //-->
422</SCRIPT>
423<NOSCRIPT>
424  <A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A>
425</NOSCRIPT>
426
427
428</FONT></TD>
429</TR>
430<TR>
431<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
432  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>
433<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
434DETAIL:&nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_detail">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD>
435</TR>
436</TABLE>
437<A NAME="skip-navbar_bottom"></A>
438<!-- ======== END OF BOTTOM NAVBAR ======= -->
439
440<HR>
441Copyright &copy; 2009 The Apache Software Foundation
442</BODY>
443</HTML>
Note: See TracBrowser for help on using the repository browser.