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