• Home
  • History
  • Annotate
  • Line#
  • Navigate
  • Raw
  • Download
  • only in /asuswrt-rt-n18u-9.0.0.4.380.2695/release/src/router/db-4.8.30/docs/java/com/sleepycat/util/
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_03) on Mon Apr 12 16:25:51 EDT 2010 -->
6<TITLE>
7FastOutputStream (Oracle - Berkeley DB Java API)
8</TITLE>
9
10<META NAME="date" CONTENT="2010-04-12">
11
12<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../style.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="FastOutputStream (Oracle - Berkeley DB Java 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/FastOutputStream.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<b>Berkeley DB</b><br><font size="-1"> version 4.8.30</font></EM>
53</TD>
54</TR>
55
56<TR>
57<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
58&nbsp;<A HREF="../../../com/sleepycat/util/FastInputStream.html" title="class in com.sleepycat.util"><B>PREV CLASS</B></A>&nbsp;
59&nbsp;<A HREF="../../../com/sleepycat/util/IOExceptionWrapper.html" title="class in com.sleepycat.util"><B>NEXT CLASS</B></A></FONT></TD>
60<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
61  <A HREF="../../../index.html?com/sleepycat/util/FastOutputStream.html" target="_top"><B>FRAMES</B></A>  &nbsp;
62&nbsp;<A HREF="FastOutputStream.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="#field_summary">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;<A HREF="#field_detail">FIELD</A>&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">
91com.sleepycat.util</FONT>
92<BR>
93Class FastOutputStream</H2>
94<PRE>
95<A HREF="http://java.sun.com/j2se/1.5.0/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/j2se/1.5.0/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 "><B>com.sleepycat.util.FastOutputStream</B>
98</PRE>
99<DL>
100<DT><B>All Implemented Interfaces:</B> <DD><A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/io/Closeable.html?is-external=true" title="class or interface in java.io">Closeable</A>, <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/io/Flushable.html?is-external=true" title="class or interface in java.io">Flushable</A></DD>
101</DL>
102<DL>
103<DT><B>Direct Known Subclasses:</B> <DD><A HREF="../../../com/sleepycat/bind/tuple/TupleOutput.html" title="class in com.sleepycat.bind.tuple">TupleOutput</A></DD>
104</DL>
105<HR>
106<DL>
107<DT><PRE>public class <B>FastOutputStream</B><DT>extends <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/io/OutputStream.html?is-external=true" title="class or interface in java.io">OutputStream</A></DL>
108</PRE>
109
110<P>
111A replacement for ByteArrayOutputStream that does not synchronize every
112 byte read.
113
114 <p>This class extends <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/io/OutputStream.html?is-external=true" title="class or interface in java.io"><CODE>OutputStream</CODE></A> and its <code>write()</code>
115 methods allow it to be used as a standard output stream.  In addition, it
116 provides <code>writeFast()</code> methods that are not declared to throw
117 <code>IOException</code>.  <code>IOException</code> is never thrown by this
118 class.</p>
119<P>
120
121<P>
122<HR>
123
124<P>
125<!-- =========== FIELD SUMMARY =========== -->
126
127<A NAME="field_summary"><!-- --></A>
128<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
129<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
130<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
131<B>Field Summary</B></FONT></TH>
132</TR>
133<TR BGCOLOR="white" CLASS="TableRowColor">
134<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
135<CODE>static&nbsp;int</CODE></FONT></TD>
136<TD><CODE><B><A HREF="../../../com/sleepycat/util/FastOutputStream.html#DEFAULT_BUMP_SIZE">DEFAULT_BUMP_SIZE</A></B></CODE>
137
138<BR>
139&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;The default amount that the buffer is increased when it is full.</TD>
140</TR>
141<TR BGCOLOR="white" CLASS="TableRowColor">
142<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
143<CODE>static&nbsp;int</CODE></FONT></TD>
144<TD><CODE><B><A HREF="../../../com/sleepycat/util/FastOutputStream.html#DEFAULT_INIT_SIZE">DEFAULT_INIT_SIZE</A></B></CODE>
145
146<BR>
147&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;The default initial size of the buffer if no initialSize parameter is
148 specified.</TD>
149</TR>
150</TABLE>
151&nbsp;
152<!-- ======== CONSTRUCTOR SUMMARY ======== -->
153
154<A NAME="constructor_summary"><!-- --></A>
155<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
156<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
157<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
158<B>Constructor Summary</B></FONT></TH>
159</TR>
160<TR BGCOLOR="white" CLASS="TableRowColor">
161<TD><CODE><B><A HREF="../../../com/sleepycat/util/FastOutputStream.html#FastOutputStream()">FastOutputStream</A></B>()</CODE>
162
163<BR>
164&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Creates an output stream with default sizes.</TD>
165</TR>
166<TR BGCOLOR="white" CLASS="TableRowColor">
167<TD><CODE><B><A HREF="../../../com/sleepycat/util/FastOutputStream.html#FastOutputStream(byte[])">FastOutputStream</A></B>(byte[]&nbsp;buffer)</CODE>
168
169<BR>
170&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Creates an output stream with a given initial buffer and a default
171 bump size.</TD>
172</TR>
173<TR BGCOLOR="white" CLASS="TableRowColor">
174<TD><CODE><B><A HREF="../../../com/sleepycat/util/FastOutputStream.html#FastOutputStream(byte[], int)">FastOutputStream</A></B>(byte[]&nbsp;buffer,
175                 int&nbsp;bumpSize)</CODE>
176
177<BR>
178&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Creates an output stream with a given initial buffer and a given
179 bump size.</TD>
180</TR>
181<TR BGCOLOR="white" CLASS="TableRowColor">
182<TD><CODE><B><A HREF="../../../com/sleepycat/util/FastOutputStream.html#FastOutputStream(int)">FastOutputStream</A></B>(int&nbsp;initialSize)</CODE>
183
184<BR>
185&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Creates an output stream with a default bump size and a given initial
186 size.</TD>
187</TR>
188<TR BGCOLOR="white" CLASS="TableRowColor">
189<TD><CODE><B><A HREF="../../../com/sleepycat/util/FastOutputStream.html#FastOutputStream(int, int)">FastOutputStream</A></B>(int&nbsp;initialSize,
190                 int&nbsp;bumpSize)</CODE>
191
192<BR>
193&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Creates an output stream with a given bump size and initial size.</TD>
194</TR>
195</TABLE>
196&nbsp;
197<!-- ========== METHOD SUMMARY =========== -->
198
199<A NAME="method_summary"><!-- --></A>
200<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
201<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
202<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
203<B>Method Summary</B></FONT></TH>
204</TR>
205<TR BGCOLOR="white" CLASS="TableRowColor">
206<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
207<CODE>&nbsp;void</CODE></FONT></TD>
208<TD><CODE><B><A HREF="../../../com/sleepycat/util/FastOutputStream.html#addSize(int)">addSize</A></B>(int&nbsp;sizeAdded)</CODE>
209
210<BR>
211&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Skip the given number of bytes in the buffer.</TD>
212</TR>
213<TR BGCOLOR="white" CLASS="TableRowColor">
214<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
215<CODE>&nbsp;byte[]</CODE></FONT></TD>
216<TD><CODE><B><A HREF="../../../com/sleepycat/util/FastOutputStream.html#getBufferBytes()">getBufferBytes</A></B>()</CODE>
217
218<BR>
219&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the buffer owned by this object.</TD>
220</TR>
221<TR BGCOLOR="white" CLASS="TableRowColor">
222<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
223<CODE>&nbsp;int</CODE></FONT></TD>
224<TD><CODE><B><A HREF="../../../com/sleepycat/util/FastOutputStream.html#getBufferLength()">getBufferLength</A></B>()</CODE>
225
226<BR>
227&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the length used in the internal buffer, i.e., the offset at
228 which data will be written next.</TD>
229</TR>
230<TR BGCOLOR="white" CLASS="TableRowColor">
231<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
232<CODE>&nbsp;int</CODE></FONT></TD>
233<TD><CODE><B><A HREF="../../../com/sleepycat/util/FastOutputStream.html#getBufferOffset()">getBufferOffset</A></B>()</CODE>
234
235<BR>
236&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the offset of the internal buffer.</TD>
237</TR>
238<TR BGCOLOR="white" CLASS="TableRowColor">
239<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
240<CODE>&nbsp;void</CODE></FONT></TD>
241<TD><CODE><B><A HREF="../../../com/sleepycat/util/FastOutputStream.html#makeSpace(int)">makeSpace</A></B>(int&nbsp;sizeNeeded)</CODE>
242
243<BR>
244&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Ensure that at least the given number of bytes are available in the
245 internal buffer.</TD>
246</TR>
247<TR BGCOLOR="white" CLASS="TableRowColor">
248<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
249<CODE>&nbsp;void</CODE></FONT></TD>
250<TD><CODE><B><A HREF="../../../com/sleepycat/util/FastOutputStream.html#reset()">reset</A></B>()</CODE>
251
252<BR>
253&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
254</TR>
255<TR BGCOLOR="white" CLASS="TableRowColor">
256<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
257<CODE>&nbsp;int</CODE></FONT></TD>
258<TD><CODE><B><A HREF="../../../com/sleepycat/util/FastOutputStream.html#size()">size</A></B>()</CODE>
259
260<BR>
261&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
262</TR>
263<TR BGCOLOR="white" CLASS="TableRowColor">
264<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
265<CODE>&nbsp;byte[]</CODE></FONT></TD>
266<TD><CODE><B><A HREF="../../../com/sleepycat/util/FastOutputStream.html#toByteArray()">toByteArray</A></B>()</CODE>
267
268<BR>
269&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
270</TR>
271<TR BGCOLOR="white" CLASS="TableRowColor">
272<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
273<CODE>&nbsp;<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A></CODE></FONT></TD>
274<TD><CODE><B><A HREF="../../../com/sleepycat/util/FastOutputStream.html#toString()">toString</A></B>()</CODE>
275
276<BR>
277&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
278</TR>
279<TR BGCOLOR="white" CLASS="TableRowColor">
280<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
281<CODE>&nbsp;<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A></CODE></FONT></TD>
282<TD><CODE><B><A HREF="../../../com/sleepycat/util/FastOutputStream.html#toString(java.lang.String)">toString</A></B>(<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A>&nbsp;encoding)</CODE>
283
284<BR>
285&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
286</TR>
287<TR BGCOLOR="white" CLASS="TableRowColor">
288<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
289<CODE>&nbsp;void</CODE></FONT></TD>
290<TD><CODE><B><A HREF="../../../com/sleepycat/util/FastOutputStream.html#write(byte[])">write</A></B>(byte[]&nbsp;fromBuf)</CODE>
291
292<BR>
293&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
294</TR>
295<TR BGCOLOR="white" CLASS="TableRowColor">
296<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
297<CODE>&nbsp;void</CODE></FONT></TD>
298<TD><CODE><B><A HREF="../../../com/sleepycat/util/FastOutputStream.html#write(byte[], int, int)">write</A></B>(byte[]&nbsp;fromBuf,
299      int&nbsp;offset,
300      int&nbsp;length)</CODE>
301
302<BR>
303&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
304</TR>
305<TR BGCOLOR="white" CLASS="TableRowColor">
306<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
307<CODE>&nbsp;void</CODE></FONT></TD>
308<TD><CODE><B><A HREF="../../../com/sleepycat/util/FastOutputStream.html#write(int)">write</A></B>(int&nbsp;b)</CODE>
309
310<BR>
311&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
312</TR>
313<TR BGCOLOR="white" CLASS="TableRowColor">
314<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
315<CODE>&nbsp;void</CODE></FONT></TD>
316<TD><CODE><B><A HREF="../../../com/sleepycat/util/FastOutputStream.html#writeFast(byte[])">writeFast</A></B>(byte[]&nbsp;fromBuf)</CODE>
317
318<BR>
319&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Equivalent to <code>write(byte[])<code> but does not throw
320 <code>IOException</code>.</TD>
321</TR>
322<TR BGCOLOR="white" CLASS="TableRowColor">
323<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
324<CODE>&nbsp;void</CODE></FONT></TD>
325<TD><CODE><B><A HREF="../../../com/sleepycat/util/FastOutputStream.html#writeFast(byte[], int, int)">writeFast</A></B>(byte[]&nbsp;fromBuf,
326          int&nbsp;offset,
327          int&nbsp;length)</CODE>
328
329<BR>
330&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Equivalent to <code>write(byte[],int,int)<code> but does not throw
331 <code>IOException</code>.</TD>
332</TR>
333<TR BGCOLOR="white" CLASS="TableRowColor">
334<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
335<CODE>&nbsp;void</CODE></FONT></TD>
336<TD><CODE><B><A HREF="../../../com/sleepycat/util/FastOutputStream.html#writeFast(int)">writeFast</A></B>(int&nbsp;b)</CODE>
337
338<BR>
339&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Equivalent to <code>write(int)<code> but does not throw
340 <code>IOException</code>.</TD>
341</TR>
342<TR BGCOLOR="white" CLASS="TableRowColor">
343<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
344<CODE>&nbsp;void</CODE></FONT></TD>
345<TD><CODE><B><A HREF="../../../com/sleepycat/util/FastOutputStream.html#writeTo(java.io.OutputStream)">writeTo</A></B>(<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/io/OutputStream.html?is-external=true" title="class or interface in java.io">OutputStream</A>&nbsp;out)</CODE>
346
347<BR>
348&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
349</TR>
350</TABLE>
351&nbsp;<A NAME="methods_inherited_from_class_java.io.OutputStream"><!-- --></A>
352<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
353<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
354<TH ALIGN="left"><B>Methods inherited from class java.io.<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/io/OutputStream.html?is-external=true" title="class or interface in java.io">OutputStream</A></B></TH>
355</TR>
356<TR BGCOLOR="white" CLASS="TableRowColor">
357<TD><CODE><A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/io/OutputStream.html?is-external=true#close()" title="class or interface in java.io">close</A>, <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/io/OutputStream.html?is-external=true#flush()" title="class or interface in java.io">flush</A></CODE></TD>
358</TR>
359</TABLE>
360&nbsp;<A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A>
361<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
362<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
363<TH ALIGN="left"><B>Methods inherited from class java.lang.<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</A></B></TH>
364</TR>
365<TR BGCOLOR="white" CLASS="TableRowColor">
366<TD><CODE><A HREF="http://java.sun.com/j2se/1.5.0/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/j2se/1.5.0/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/j2se/1.5.0/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/j2se/1.5.0/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/j2se/1.5.0/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/j2se/1.5.0/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/j2se/1.5.0/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/j2se/1.5.0/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/j2se/1.5.0/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/j2se/1.5.0/docs/api/java/lang/Object.html?is-external=true#wait(long, int)" title="class or interface in java.lang">wait</A></CODE></TD>
367</TR>
368</TABLE>
369&nbsp;
370<P>
371
372<!-- ============ FIELD DETAIL =========== -->
373
374<A NAME="field_detail"><!-- --></A>
375<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
376<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
377<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
378<B>Field Detail</B></FONT></TH>
379</TR>
380</TABLE>
381
382<A NAME="DEFAULT_INIT_SIZE"><!-- --></A><H3>
383DEFAULT_INIT_SIZE</H3>
384<PRE>
385public static final int <B>DEFAULT_INIT_SIZE</B></PRE>
386<DL>
387<DD>The default initial size of the buffer if no initialSize parameter is
388 specified.  This constant is 100 bytes.
389<P>
390<DL>
391<DT><B>See Also:</B><DD><A HREF="../../../constant-values.html#com.sleepycat.util.FastOutputStream.DEFAULT_INIT_SIZE">Constant Field Values</A></DL>
392</DL>
393<HR>
394
395<A NAME="DEFAULT_BUMP_SIZE"><!-- --></A><H3>
396DEFAULT_BUMP_SIZE</H3>
397<PRE>
398public static final int <B>DEFAULT_BUMP_SIZE</B></PRE>
399<DL>
400<DD>The default amount that the buffer is increased when it is full.  This
401 constant is zero, which means to double the current buffer size.
402<P>
403<DL>
404<DT><B>See Also:</B><DD><A HREF="../../../constant-values.html#com.sleepycat.util.FastOutputStream.DEFAULT_BUMP_SIZE">Constant Field Values</A></DL>
405</DL>
406
407<!-- ========= CONSTRUCTOR DETAIL ======== -->
408
409<A NAME="constructor_detail"><!-- --></A>
410<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
411<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
412<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
413<B>Constructor Detail</B></FONT></TH>
414</TR>
415</TABLE>
416
417<A NAME="FastOutputStream()"><!-- --></A><H3>
418FastOutputStream</H3>
419<PRE>
420public <B>FastOutputStream</B>()</PRE>
421<DL>
422<DD>Creates an output stream with default sizes.
423<P>
424</DL>
425<HR>
426
427<A NAME="FastOutputStream(int)"><!-- --></A><H3>
428FastOutputStream</H3>
429<PRE>
430public <B>FastOutputStream</B>(int&nbsp;initialSize)</PRE>
431<DL>
432<DD>Creates an output stream with a default bump size and a given initial
433 size.
434<P>
435<DL>
436<DT><B>Parameters:</B><DD><CODE>initialSize</CODE> - the initial size of the buffer.</DL>
437</DL>
438<HR>
439
440<A NAME="FastOutputStream(int, int)"><!-- --></A><H3>
441FastOutputStream</H3>
442<PRE>
443public <B>FastOutputStream</B>(int&nbsp;initialSize,
444                        int&nbsp;bumpSize)</PRE>
445<DL>
446<DD>Creates an output stream with a given bump size and initial size.
447<P>
448<DL>
449<DT><B>Parameters:</B><DD><CODE>initialSize</CODE> - the initial size of the buffer.<DD><CODE>bumpSize</CODE> - the amount to increment the buffer.</DL>
450</DL>
451<HR>
452
453<A NAME="FastOutputStream(byte[])"><!-- --></A><H3>
454FastOutputStream</H3>
455<PRE>
456public <B>FastOutputStream</B>(byte[]&nbsp;buffer)</PRE>
457<DL>
458<DD>Creates an output stream with a given initial buffer and a default
459 bump size.
460<P>
461<DL>
462<DT><B>Parameters:</B><DD><CODE>buffer</CODE> - the initial buffer; will be owned by this object.</DL>
463</DL>
464<HR>
465
466<A NAME="FastOutputStream(byte[], int)"><!-- --></A><H3>
467FastOutputStream</H3>
468<PRE>
469public <B>FastOutputStream</B>(byte[]&nbsp;buffer,
470                        int&nbsp;bumpSize)</PRE>
471<DL>
472<DD>Creates an output stream with a given initial buffer and a given
473 bump size.
474<P>
475<DL>
476<DT><B>Parameters:</B><DD><CODE>buffer</CODE> - the initial buffer; will be owned by this object.<DD><CODE>bumpSize</CODE> - the amount to increment the buffer.  If zero (the
477 default), the current buffer size will be doubled when the buffer is
478 full.</DL>
479</DL>
480
481<!-- ============ METHOD DETAIL ========== -->
482
483<A NAME="method_detail"><!-- --></A>
484<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
485<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
486<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
487<B>Method Detail</B></FONT></TH>
488</TR>
489</TABLE>
490
491<A NAME="size()"><!-- --></A><H3>
492size</H3>
493<PRE>
494public int <B>size</B>()</PRE>
495<DL>
496<DD><DL>
497</DL>
498</DD>
499</DL>
500<HR>
501
502<A NAME="reset()"><!-- --></A><H3>
503reset</H3>
504<PRE>
505public void <B>reset</B>()</PRE>
506<DL>
507<DD><DL>
508</DL>
509</DD>
510</DL>
511<HR>
512
513<A NAME="write(int)"><!-- --></A><H3>
514write</H3>
515<PRE>
516public void <B>write</B>(int&nbsp;b)</PRE>
517<DL>
518<DD><DL>
519<DT><B>Specified by:</B><DD><CODE><A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/io/OutputStream.html?is-external=true#write(int)" title="class or interface in java.io">write</A></CODE> in class <CODE><A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/io/OutputStream.html?is-external=true" title="class or interface in java.io">OutputStream</A></CODE></DL>
520</DD>
521<DD><DL>
522</DL>
523</DD>
524</DL>
525<HR>
526
527<A NAME="write(byte[])"><!-- --></A><H3>
528write</H3>
529<PRE>
530public void <B>write</B>(byte[]&nbsp;fromBuf)</PRE>
531<DL>
532<DD><DL>
533<DT><B>Overrides:</B><DD><CODE><A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/io/OutputStream.html?is-external=true#write(byte[])" title="class or interface in java.io">write</A></CODE> in class <CODE><A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/io/OutputStream.html?is-external=true" title="class or interface in java.io">OutputStream</A></CODE></DL>
534</DD>
535<DD><DL>
536</DL>
537</DD>
538</DL>
539<HR>
540
541<A NAME="write(byte[], int, int)"><!-- --></A><H3>
542write</H3>
543<PRE>
544public void <B>write</B>(byte[]&nbsp;fromBuf,
545                  int&nbsp;offset,
546                  int&nbsp;length)</PRE>
547<DL>
548<DD><DL>
549<DT><B>Overrides:</B><DD><CODE><A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/io/OutputStream.html?is-external=true#write(byte[], int, int)" title="class or interface in java.io">write</A></CODE> in class <CODE><A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/io/OutputStream.html?is-external=true" title="class or interface in java.io">OutputStream</A></CODE></DL>
550</DD>
551<DD><DL>
552</DL>
553</DD>
554</DL>
555<HR>
556
557<A NAME="writeTo(java.io.OutputStream)"><!-- --></A><H3>
558writeTo</H3>
559<PRE>
560public void <B>writeTo</B>(<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/io/OutputStream.html?is-external=true" title="class or interface in java.io">OutputStream</A>&nbsp;out)
561             throws <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</A></PRE>
562<DL>
563<DD><DL>
564
565<DT><B>Throws:</B>
566<DD><CODE><A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</A></CODE></DL>
567</DD>
568</DL>
569<HR>
570
571<A NAME="toString()"><!-- --></A><H3>
572toString</H3>
573<PRE>
574public <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A> <B>toString</B>()</PRE>
575<DL>
576<DD><DL>
577<DT><B>Overrides:</B><DD><CODE><A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Object.html?is-external=true#toString()" title="class or interface in java.lang">toString</A></CODE> in class <CODE><A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</A></CODE></DL>
578</DD>
579<DD><DL>
580</DL>
581</DD>
582</DL>
583<HR>
584
585<A NAME="toString(java.lang.String)"><!-- --></A><H3>
586toString</H3>
587<PRE>
588public <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A> <B>toString</B>(<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A>&nbsp;encoding)
589                throws <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/io/UnsupportedEncodingException.html?is-external=true" title="class or interface in java.io">UnsupportedEncodingException</A></PRE>
590<DL>
591<DD><DL>
592
593<DT><B>Throws:</B>
594<DD><CODE><A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/io/UnsupportedEncodingException.html?is-external=true" title="class or interface in java.io">UnsupportedEncodingException</A></CODE></DL>
595</DD>
596</DL>
597<HR>
598
599<A NAME="toByteArray()"><!-- --></A><H3>
600toByteArray</H3>
601<PRE>
602public byte[] <B>toByteArray</B>()</PRE>
603<DL>
604<DD><DL>
605</DL>
606</DD>
607</DL>
608<HR>
609
610<A NAME="writeFast(int)"><!-- --></A><H3>
611writeFast</H3>
612<PRE>
613public final void <B>writeFast</B>(int&nbsp;b)</PRE>
614<DL>
615<DD>Equivalent to <code>write(int)<code> but does not throw
616 <code>IOException</code>.
617<P>
618<DD><DL>
619<DT><B>See Also:</B><DD><A HREF="../../../com/sleepycat/util/FastOutputStream.html#write(int)"><CODE>write(int)</CODE></A></DL>
620</DD>
621</DL>
622<HR>
623
624<A NAME="writeFast(byte[])"><!-- --></A><H3>
625writeFast</H3>
626<PRE>
627public final void <B>writeFast</B>(byte[]&nbsp;fromBuf)</PRE>
628<DL>
629<DD>Equivalent to <code>write(byte[])<code> but does not throw
630 <code>IOException</code>.
631<P>
632<DD><DL>
633<DT><B>See Also:</B><DD><A HREF="../../../com/sleepycat/util/FastOutputStream.html#write(byte[])"><CODE>write(byte[])</CODE></A></DL>
634</DD>
635</DL>
636<HR>
637
638<A NAME="writeFast(byte[], int, int)"><!-- --></A><H3>
639writeFast</H3>
640<PRE>
641public final void <B>writeFast</B>(byte[]&nbsp;fromBuf,
642                            int&nbsp;offset,
643                            int&nbsp;length)</PRE>
644<DL>
645<DD>Equivalent to <code>write(byte[],int,int)<code> but does not throw
646 <code>IOException</code>.
647<P>
648<DD><DL>
649<DT><B>See Also:</B><DD><A HREF="../../../com/sleepycat/util/FastOutputStream.html#write(byte[], int, int)"><CODE>write(byte[],int,int)</CODE></A></DL>
650</DD>
651</DL>
652<HR>
653
654<A NAME="getBufferBytes()"><!-- --></A><H3>
655getBufferBytes</H3>
656<PRE>
657public byte[] <B>getBufferBytes</B>()</PRE>
658<DL>
659<DD>Returns the buffer owned by this object.
660<P>
661<DD><DL>
662
663<DT><B>Returns:</B><DD>the buffer.</DL>
664</DD>
665</DL>
666<HR>
667
668<A NAME="getBufferOffset()"><!-- --></A><H3>
669getBufferOffset</H3>
670<PRE>
671public int <B>getBufferOffset</B>()</PRE>
672<DL>
673<DD>Returns the offset of the internal buffer.
674<P>
675<DD><DL>
676
677<DT><B>Returns:</B><DD>always zero currently.</DL>
678</DD>
679</DL>
680<HR>
681
682<A NAME="getBufferLength()"><!-- --></A><H3>
683getBufferLength</H3>
684<PRE>
685public int <B>getBufferLength</B>()</PRE>
686<DL>
687<DD>Returns the length used in the internal buffer, i.e., the offset at
688 which data will be written next.
689<P>
690<DD><DL>
691
692<DT><B>Returns:</B><DD>the buffer length.</DL>
693</DD>
694</DL>
695<HR>
696
697<A NAME="makeSpace(int)"><!-- --></A><H3>
698makeSpace</H3>
699<PRE>
700public void <B>makeSpace</B>(int&nbsp;sizeNeeded)</PRE>
701<DL>
702<DD>Ensure that at least the given number of bytes are available in the
703 internal buffer.
704<P>
705<DD><DL>
706<DT><B>Parameters:</B><DD><CODE>sizeNeeded</CODE> - the number of bytes desired.</DL>
707</DD>
708</DL>
709<HR>
710
711<A NAME="addSize(int)"><!-- --></A><H3>
712addSize</H3>
713<PRE>
714public void <B>addSize</B>(int&nbsp;sizeAdded)</PRE>
715<DL>
716<DD>Skip the given number of bytes in the buffer.
717<P>
718<DD><DL>
719<DT><B>Parameters:</B><DD><CODE>sizeAdded</CODE> - number of bytes to skip.</DL>
720</DD>
721</DL>
722<!-- ========= END OF CLASS DATA ========= -->
723<HR>
724
725
726<!-- ======= START OF BOTTOM NAVBAR ====== -->
727<A NAME="navbar_bottom"><!-- --></A>
728<A HREF="#skip-navbar_bottom" title="Skip navigation links"></A>
729<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
730<TR>
731<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
732<A NAME="navbar_bottom_firstrow"><!-- --></A>
733<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
734  <TR ALIGN="center" VALIGN="top">
735  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
736  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
737  <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
738  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="class-use/FastOutputStream.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A>&nbsp;</TD>
739  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
740  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
741  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
742  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
743  </TR>
744</TABLE>
745</TD>
746<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
747<b>Berkeley DB</b><br><font size="-1"> version 4.8.30</font></EM>
748</TD>
749</TR>
750
751<TR>
752<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
753&nbsp;<A HREF="../../../com/sleepycat/util/FastInputStream.html" title="class in com.sleepycat.util"><B>PREV CLASS</B></A>&nbsp;
754&nbsp;<A HREF="../../../com/sleepycat/util/IOExceptionWrapper.html" title="class in com.sleepycat.util"><B>NEXT CLASS</B></A></FONT></TD>
755<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
756  <A HREF="../../../index.html?com/sleepycat/util/FastOutputStream.html" target="_top"><B>FRAMES</B></A>  &nbsp;
757&nbsp;<A HREF="FastOutputStream.html" target="_top"><B>NO FRAMES</B></A>  &nbsp;
758&nbsp;<SCRIPT type="text/javascript">
759  <!--
760  if(window==top) {
761    document.writeln('<A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A>');
762  }
763  //-->
764</SCRIPT>
765<NOSCRIPT>
766  <A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A>
767</NOSCRIPT>
768
769
770</FONT></TD>
771</TR>
772<TR>
773<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
774  SUMMARY:&nbsp;NESTED&nbsp;|&nbsp;<A HREF="#field_summary">FIELD</A>&nbsp;|&nbsp;<A HREF="#constructor_summary">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
775<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
776DETAIL:&nbsp;<A HREF="#field_detail">FIELD</A>&nbsp;|&nbsp;<A HREF="#constructor_detail">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD>
777</TR>
778</TABLE>
779<A NAME="skip-navbar_bottom"></A>
780<!-- ======== END OF BOTTOM NAVBAR ======= -->
781
782<HR>
783<font size=1>Copyright (c) 1996-2009 Oracle.  All rights reserved.</font>
784</BODY>
785</HTML>
786