<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <!--NewPage--> <HTML> <HEAD> <!-- Generated by javadoc (build 1.4.2_05) on Mon Nov 08 21:00:51 EST 2004 --> <TITLE> FastOutputStream (Sleepycat Software, Inc. - Berkeley DB Java API) </TITLE> <META NAME="keywords" CONTENT="com.sleepycat.util.FastOutputStream class"> <LINK REL ="stylesheet" TYPE="text/css" HREF="../../../style.css" TITLE="Style"> <SCRIPT type="text/javascript"> function windowTitle() { parent.document.title="FastOutputStream (Sleepycat Software, Inc. - Berkeley DB Java API)"; } </SCRIPT> </HEAD> <BODY BGCOLOR="white" onload="windowTitle();"> <!-- ========= START OF TOP NAVBAR ======= --> <A NAME="navbar_top"><!-- --></A> <A HREF="#skip-navbar_top" title="Skip navigation links"></A> <TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY=""> <TR> <TD COLSPAN=3 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A NAME="navbar_top_firstrow"><!-- --></A> <TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY=""> <TR ALIGN="center" VALIGN="top"> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD> <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="class-use/FastOutputStream.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD> </TR> </TABLE> </TD> <TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM> <b>Berkeley DB</b><br><font size="-1"> version 4.3.21</font></EM> </TD> </TR> <TR> <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> <A HREF="../../../com/sleepycat/util/FastInputStream.html" title="class in com.sleepycat.util"><B>PREV CLASS</B></A> <A HREF="../../../com/sleepycat/util/UtfOps.html" title="class in com.sleepycat.util"><B>NEXT CLASS</B></A></FONT></TD> <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> <A HREF="../../../index.html" target="_top"><B>FRAMES</B></A> <A HREF="FastOutputStream.html" target="_top"><B>NO FRAMES</B></A> <SCRIPT type="text/javascript"> <!-- if(window==top) { document.writeln('<A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A>'); } //--> </SCRIPT> <NOSCRIPT> <A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A> </NOSCRIPT> </FONT></TD> </TR> <TR> <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> SUMMARY: NESTED | <A HREF="#field_summary">FIELD</A> | <A HREF="#constructor_summary">CONSTR</A> | <A HREF="#method_summary">METHOD</A></FONT></TD> <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> DETAIL: <A HREF="#field_detail">FIELD</A> | <A HREF="#constructor_detail">CONSTR</A> | <A HREF="#method_detail">METHOD</A></FONT></TD> </TR> </TABLE> <A NAME="skip-navbar_top"></A> <!-- ========= END OF TOP NAVBAR ========= --> <HR> <!-- ======== START OF CLASS DATA ======== --> <H2> <FONT SIZE="-1"> com.sleepycat.util</FONT> <BR> Class FastOutputStream</H2> <PRE> <A HREF="http://java.sun.com/j2se/1.3/docs/api/java/lang/Object.html" title="class or interface in java.lang">java.lang.Object</A> <IMG SRC="../../../resources/inherit.gif" ALT="extended by"><A HREF="http://java.sun.com/j2se/1.3/docs/api/java/io/OutputStream.html" title="class or interface in java.io">java.io.OutputStream</A> <IMG SRC="../../../resources/inherit.gif" ALT="extended by"><B>com.sleepycat.util.FastOutputStream</B> </PRE> <DL> <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> </DL> <HR> <DL> <DT>public class <B>FastOutputStream</B><DT>extends <A HREF="http://java.sun.com/j2se/1.3/docs/api/java/io/OutputStream.html" title="class or interface in java.io">OutputStream</A></DL> <P> A replacement for ByteArrayOutputStream that does not synchronize every byte read. <p>This class extends <A HREF="http://java.sun.com/j2se/1.3/docs/api/java/io/OutputStream.html" title="class or interface in java.io"><CODE>OutputStream</CODE></A> and its <code>write()</code> methods allow it to be used as a standard output stream. In addition, it provides <code>writeFast()</code> methods that are not declared to throw <code>IOException</code>. <code>IOException</code> is never thrown by this class.</p> <P> <P> <HR> <P> <!-- ======== NESTED CLASS SUMMARY ======== --> <!-- =========== FIELD SUMMARY =========== --> <A NAME="field_summary"><!-- --></A> <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> <TD COLSPAN=2><FONT SIZE="+2"> <B>Field Summary</B></FONT></TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE>static int</CODE></FONT></TD> <TD><CODE><B><A HREF="../../../com/sleepycat/util/FastOutputStream.html#DEFAULT_BUMP_SIZE">DEFAULT_BUMP_SIZE</A></B></CODE> <BR> </TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE>static int</CODE></FONT></TD> <TD><CODE><B><A HREF="../../../com/sleepycat/util/FastOutputStream.html#DEFAULT_INIT_SIZE">DEFAULT_INIT_SIZE</A></B></CODE> <BR> </TD> </TR> </TABLE> <!-- ======== CONSTRUCTOR SUMMARY ======== --> <A NAME="constructor_summary"><!-- --></A> <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> <TD COLSPAN=2><FONT SIZE="+2"> <B>Constructor Summary</B></FONT></TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD><CODE><B><A HREF="../../../com/sleepycat/util/FastOutputStream.html#FastOutputStream()">FastOutputStream</A></B>()</CODE> <BR> Creates an output stream with default sizes.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD><CODE><B><A HREF="../../../com/sleepycat/util/FastOutputStream.html#FastOutputStream(byte[])">FastOutputStream</A></B>(byte[] buffer)</CODE> <BR> Creates an output stream with a given initial buffer and a default bump size.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD><CODE><B><A HREF="../../../com/sleepycat/util/FastOutputStream.html#FastOutputStream(byte[], int)">FastOutputStream</A></B>(byte[] buffer, int bumpSize)</CODE> <BR> Creates an output stream with a given initial buffer and a given bump size.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD><CODE><B><A HREF="../../../com/sleepycat/util/FastOutputStream.html#FastOutputStream(int)">FastOutputStream</A></B>(int initialSize)</CODE> <BR> Creates an output stream with a default bump size and a given initial size.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD><CODE><B><A HREF="../../../com/sleepycat/util/FastOutputStream.html#FastOutputStream(int, int)">FastOutputStream</A></B>(int initialSize, int bumpSize)</CODE> <BR> Creates an output stream with a given bump size and initial size.</TD> </TR> </TABLE> <!-- ========== METHOD SUMMARY =========== --> <A NAME="method_summary"><!-- --></A> <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> <TD COLSPAN=2><FONT SIZE="+2"> <B>Method Summary</B></FONT></TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> void</CODE></FONT></TD> <TD><CODE><B><A HREF="../../../com/sleepycat/util/FastOutputStream.html#addSize(int)">addSize</A></B>(int sizeAdded)</CODE> <BR> Skip the given number of bytes in the buffer.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> byte[]</CODE></FONT></TD> <TD><CODE><B><A HREF="../../../com/sleepycat/util/FastOutputStream.html#getBufferBytes()">getBufferBytes</A></B>()</CODE> <BR> Returns the buffer owned by this object.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> int</CODE></FONT></TD> <TD><CODE><B><A HREF="../../../com/sleepycat/util/FastOutputStream.html#getBufferLength()">getBufferLength</A></B>()</CODE> <BR> Returns the length used in the internal buffer, i.e., the offset at which data will be written next.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> int</CODE></FONT></TD> <TD><CODE><B><A HREF="../../../com/sleepycat/util/FastOutputStream.html#getBufferOffset()">getBufferOffset</A></B>()</CODE> <BR> Returns the offset of the internal buffer.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> void</CODE></FONT></TD> <TD><CODE><B><A HREF="../../../com/sleepycat/util/FastOutputStream.html#makeSpace(int)">makeSpace</A></B>(int sizeNeeded)</CODE> <BR> Ensure that at least the given number of bytes are available in the internal buffer.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> void</CODE></FONT></TD> <TD><CODE><B><A HREF="../../../com/sleepycat/util/FastOutputStream.html#reset()">reset</A></B>()</CODE> <BR> </TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> int</CODE></FONT></TD> <TD><CODE><B><A HREF="../../../com/sleepycat/util/FastOutputStream.html#size()">size</A></B>()</CODE> <BR> </TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> byte[]</CODE></FONT></TD> <TD><CODE><B><A HREF="../../../com/sleepycat/util/FastOutputStream.html#toByteArray()">toByteArray</A></B>()</CODE> <BR> </TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> void</CODE></FONT></TD> <TD><CODE><B><A HREF="../../../com/sleepycat/util/FastOutputStream.html#toByteArray(byte[], int)">toByteArray</A></B>(byte[] toBuf, int offset)</CODE> <BR> Copy the buffered data to the given array.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> <A HREF="http://java.sun.com/j2se/1.3/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A></CODE></FONT></TD> <TD><CODE><B><A HREF="../../../com/sleepycat/util/FastOutputStream.html#toString()">toString</A></B>()</CODE> <BR> </TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> <A HREF="http://java.sun.com/j2se/1.3/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A></CODE></FONT></TD> <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.3/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> encoding)</CODE> <BR> </TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> void</CODE></FONT></TD> <TD><CODE><B><A HREF="../../../com/sleepycat/util/FastOutputStream.html#write(byte[])">write</A></B>(byte[] fromBuf)</CODE> <BR> </TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> void</CODE></FONT></TD> <TD><CODE><B><A HREF="../../../com/sleepycat/util/FastOutputStream.html#write(byte[], int, int)">write</A></B>(byte[] fromBuf, int offset, int length)</CODE> <BR> </TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> void</CODE></FONT></TD> <TD><CODE><B><A HREF="../../../com/sleepycat/util/FastOutputStream.html#write(int)">write</A></B>(int b)</CODE> <BR> </TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> void</CODE></FONT></TD> <TD><CODE><B><A HREF="../../../com/sleepycat/util/FastOutputStream.html#writeFast(byte[])">writeFast</A></B>(byte[] fromBuf)</CODE> <BR> Equivalent to <code>write(byte[])<code> but does not throw <code>IOException</code>.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> void</CODE></FONT></TD> <TD><CODE><B><A HREF="../../../com/sleepycat/util/FastOutputStream.html#writeFast(byte[], int, int)">writeFast</A></B>(byte[] fromBuf, int offset, int length)</CODE> <BR> Equivalent to <code>write(byte[],int,int)<code> but does not throw <code>IOException</code>.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> void</CODE></FONT></TD> <TD><CODE><B><A HREF="../../../com/sleepycat/util/FastOutputStream.html#writeFast(int)">writeFast</A></B>(int b)</CODE> <BR> Equivalent to <code>write(int)<code> but does not throw <code>IOException</code>.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> void</CODE></FONT></TD> <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.3/docs/api/java/io/OutputStream.html" title="class or interface in java.io">OutputStream</A> out)</CODE> <BR> </TD> </TR> </TABLE> <A NAME="methods_inherited_from_class_java.io.OutputStream"><!-- --></A> <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> <TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor"> <TD><B>Methods inherited from class java.io.<A HREF="http://java.sun.com/j2se/1.3/docs/api/java/io/OutputStream.html" title="class or interface in java.io">OutputStream</A></B></TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD><CODE><A HREF="http://java.sun.com/j2se/1.3/docs/api/java/io/OutputStream.html#close()" title="class or interface in java.io">close</A>, <A HREF="http://java.sun.com/j2se/1.3/docs/api/java/io/OutputStream.html#flush()" title="class or interface in java.io">flush</A></CODE></TD> </TR> </TABLE> <A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A> <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> <TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor"> <TD><B>Methods inherited from class java.lang.<A HREF="http://java.sun.com/j2se/1.3/docs/api/java/lang/Object.html" title="class or interface in java.lang">Object</A></B></TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD><CODE><A HREF="http://java.sun.com/j2se/1.3/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.3/docs/api/java/lang/Object.html#getClass()" title="class or interface in java.lang">getClass</A>, <A HREF="http://java.sun.com/j2se/1.3/docs/api/java/lang/Object.html#hashCode()" title="class or interface in java.lang">hashCode</A>, <A HREF="http://java.sun.com/j2se/1.3/docs/api/java/lang/Object.html#notify()" title="class or interface in java.lang">notify</A>, <A HREF="http://java.sun.com/j2se/1.3/docs/api/java/lang/Object.html#notifyAll()" title="class or interface in java.lang">notifyAll</A>, <A HREF="http://java.sun.com/j2se/1.3/docs/api/java/lang/Object.html#wait()" title="class or interface in java.lang">wait</A>, <A HREF="http://java.sun.com/j2se/1.3/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.3/docs/api/java/lang/Object.html#wait(long, int)" title="class or interface in java.lang">wait</A></CODE></TD> </TR> </TABLE> <P> <!-- ============ FIELD DETAIL =========== --> <A NAME="field_detail"><!-- --></A> <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> <TD COLSPAN=1><FONT SIZE="+2"> <B>Field Detail</B></FONT></TD> </TR> </TABLE> <A NAME="DEFAULT_INIT_SIZE"><!-- --></A><H3> DEFAULT_INIT_SIZE</H3> <PRE> public static final int <B>DEFAULT_INIT_SIZE</B></PRE> <DL> <DL> <DT><B>See Also:</B><DD><A HREF="../../../constant-values.html#com.sleepycat.util.FastOutputStream.DEFAULT_INIT_SIZE">Constant Field Values</A></DL> </DL> <HR> <A NAME="DEFAULT_BUMP_SIZE"><!-- --></A><H3> DEFAULT_BUMP_SIZE</H3> <PRE> public static final int <B>DEFAULT_BUMP_SIZE</B></PRE> <DL> <DL> <DT><B>See Also:</B><DD><A HREF="../../../constant-values.html#com.sleepycat.util.FastOutputStream.DEFAULT_BUMP_SIZE">Constant Field Values</A></DL> </DL> <!-- ========= CONSTRUCTOR DETAIL ======== --> <A NAME="constructor_detail"><!-- --></A> <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> <TD COLSPAN=1><FONT SIZE="+2"> <B>Constructor Detail</B></FONT></TD> </TR> </TABLE> <A NAME="FastOutputStream()"><!-- --></A><H3> FastOutputStream</H3> <PRE> public <B>FastOutputStream</B>()</PRE> <DL> <DD>Creates an output stream with default sizes. <P> </DL> <HR> <A NAME="FastOutputStream(int)"><!-- --></A><H3> FastOutputStream</H3> <PRE> public <B>FastOutputStream</B>(int initialSize)</PRE> <DL> <DD>Creates an output stream with a default bump size and a given initial size. <P> <DT><B>Parameters:</B><DD><CODE>initialSize</CODE> - the initial size of the buffer.</DL> <HR> <A NAME="FastOutputStream(int, int)"><!-- --></A><H3> FastOutputStream</H3> <PRE> public <B>FastOutputStream</B>(int initialSize, int bumpSize)</PRE> <DL> <DD>Creates an output stream with a given bump size and initial size. <P> <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> <HR> <A NAME="FastOutputStream(byte[])"><!-- --></A><H3> FastOutputStream</H3> <PRE> public <B>FastOutputStream</B>(byte[] buffer)</PRE> <DL> <DD>Creates an output stream with a given initial buffer and a default bump size. <P> <DT><B>Parameters:</B><DD><CODE>buffer</CODE> - the initial buffer; will be owned by this object.</DL> <HR> <A NAME="FastOutputStream(byte[], int)"><!-- --></A><H3> FastOutputStream</H3> <PRE> public <B>FastOutputStream</B>(byte[] buffer, int bumpSize)</PRE> <DL> <DD>Creates an output stream with a given initial buffer and a given bump size. <P> <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.</DL> <!-- ============ METHOD DETAIL ========== --> <A NAME="method_detail"><!-- --></A> <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> <TD COLSPAN=1><FONT SIZE="+2"> <B>Method Detail</B></FONT></TD> </TR> </TABLE> <A NAME="size()"><!-- --></A><H3> size</H3> <PRE> public int <B>size</B>()</PRE> <DL> <DD><DL> </DL> </DD> </DL> <HR> <A NAME="reset()"><!-- --></A><H3> reset</H3> <PRE> public void <B>reset</B>()</PRE> <DL> <DD><DL> </DL> </DD> </DL> <HR> <A NAME="write(int)"><!-- --></A><H3> write</H3> <PRE> public void <B>write</B>(int b) throws <A HREF="http://java.sun.com/j2se/1.3/docs/api/java/io/IOException.html" title="class or interface in java.io">IOException</A></PRE> <DL> <DD><DL> <DT><B>Throws:</B> <DD><CODE><A HREF="http://java.sun.com/j2se/1.3/docs/api/java/io/IOException.html" title="class or interface in java.io">IOException</A></CODE></DL> </DD> </DL> <HR> <A NAME="write(byte[])"><!-- --></A><H3> write</H3> <PRE> public void <B>write</B>(byte[] fromBuf) throws <A HREF="http://java.sun.com/j2se/1.3/docs/api/java/io/IOException.html" title="class or interface in java.io">IOException</A></PRE> <DL> <DD><DL> <DT><B>Throws:</B> <DD><CODE><A HREF="http://java.sun.com/j2se/1.3/docs/api/java/io/IOException.html" title="class or interface in java.io">IOException</A></CODE></DL> </DD> </DL> <HR> <A NAME="write(byte[], int, int)"><!-- --></A><H3> write</H3> <PRE> public void <B>write</B>(byte[] fromBuf, int offset, int length) throws <A HREF="http://java.sun.com/j2se/1.3/docs/api/java/io/IOException.html" title="class or interface in java.io">IOException</A></PRE> <DL> <DD><DL> <DT><B>Throws:</B> <DD><CODE><A HREF="http://java.sun.com/j2se/1.3/docs/api/java/io/IOException.html" title="class or interface in java.io">IOException</A></CODE></DL> </DD> </DL> <HR> <A NAME="writeTo(java.io.OutputStream)"><!-- --></A><H3> writeTo</H3> <PRE> public void <B>writeTo</B>(<A HREF="http://java.sun.com/j2se/1.3/docs/api/java/io/OutputStream.html" title="class or interface in java.io">OutputStream</A> out) throws <A HREF="http://java.sun.com/j2se/1.3/docs/api/java/io/IOException.html" title="class or interface in java.io">IOException</A></PRE> <DL> <DD><DL> <DT><B>Throws:</B> <DD><CODE><A HREF="http://java.sun.com/j2se/1.3/docs/api/java/io/IOException.html" title="class or interface in java.io">IOException</A></CODE></DL> </DD> </DL> <HR> <A NAME="toString()"><!-- --></A><H3> toString</H3> <PRE> public <A HREF="http://java.sun.com/j2se/1.3/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> <B>toString</B>()</PRE> <DL> <DD><DL> </DL> </DD> </DL> <HR> <A NAME="toString(java.lang.String)"><!-- --></A><H3> toString</H3> <PRE> public <A HREF="http://java.sun.com/j2se/1.3/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.3/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> encoding) throws <A HREF="http://java.sun.com/j2se/1.3/docs/api/java/io/UnsupportedEncodingException.html" title="class or interface in java.io">UnsupportedEncodingException</A></PRE> <DL> <DD><DL> <DT><B>Throws:</B> <DD><CODE><A HREF="http://java.sun.com/j2se/1.3/docs/api/java/io/UnsupportedEncodingException.html" title="class or interface in java.io">UnsupportedEncodingException</A></CODE></DL> </DD> </DL> <HR> <A NAME="toByteArray()"><!-- --></A><H3> toByteArray</H3> <PRE> public byte[] <B>toByteArray</B>()</PRE> <DL> <DD><DL> </DL> </DD> </DL> <HR> <A NAME="writeFast(int)"><!-- --></A><H3> writeFast</H3> <PRE> public final void <B>writeFast</B>(int b)</PRE> <DL> <DD>Equivalent to <code>write(int)<code> but does not throw <code>IOException</code>. <P> <DD><DL> <DT><B>See Also:</B><DD><A HREF="../../../com/sleepycat/util/FastOutputStream.html#write(int)"><CODE>write(int)</CODE></A></DL> </DD> </DL> <HR> <A NAME="writeFast(byte[])"><!-- --></A><H3> writeFast</H3> <PRE> public final void <B>writeFast</B>(byte[] fromBuf)</PRE> <DL> <DD>Equivalent to <code>write(byte[])<code> but does not throw <code>IOException</code>. <P> <DD><DL> <DT><B>See Also:</B><DD><A HREF="../../../com/sleepycat/util/FastOutputStream.html#write(byte[])"><CODE>write(byte[])</CODE></A></DL> </DD> </DL> <HR> <A NAME="writeFast(byte[], int, int)"><!-- --></A><H3> writeFast</H3> <PRE> public final void <B>writeFast</B>(byte[] fromBuf, int offset, int length)</PRE> <DL> <DD>Equivalent to <code>write(byte[],int,int)<code> but does not throw <code>IOException</code>. <P> <DD><DL> <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> </DD> </DL> <HR> <A NAME="toByteArray(byte[], int)"><!-- --></A><H3> toByteArray</H3> <PRE> public void <B>toByteArray</B>(byte[] toBuf, int offset)</PRE> <DL> <DD>Copy the buffered data to the given array. <P> <DD><DL> <DT><B>Parameters:</B><DD><CODE>toBuf</CODE> - the buffer to hold a copy of the data.<DD><CODE>offset</CODE> - the offset at which to start copying.</DL> </DD> </DL> <HR> <A NAME="getBufferBytes()"><!-- --></A><H3> getBufferBytes</H3> <PRE> public byte[] <B>getBufferBytes</B>()</PRE> <DL> <DD>Returns the buffer owned by this object. <P> <DD><DL> <DT><B>Returns:</B><DD>the buffer.</DL> </DD> </DL> <HR> <A NAME="getBufferOffset()"><!-- --></A><H3> getBufferOffset</H3> <PRE> public int <B>getBufferOffset</B>()</PRE> <DL> <DD>Returns the offset of the internal buffer. <P> <DD><DL> <DT><B>Returns:</B><DD>always zero currently.</DL> </DD> </DL> <HR> <A NAME="getBufferLength()"><!-- --></A><H3> getBufferLength</H3> <PRE> public int <B>getBufferLength</B>()</PRE> <DL> <DD>Returns the length used in the internal buffer, i.e., the offset at which data will be written next. <P> <DD><DL> <DT><B>Returns:</B><DD>the buffer length.</DL> </DD> </DL> <HR> <A NAME="makeSpace(int)"><!-- --></A><H3> makeSpace</H3> <PRE> public void <B>makeSpace</B>(int sizeNeeded)</PRE> <DL> <DD>Ensure that at least the given number of bytes are available in the internal buffer. <P> <DD><DL> <DT><B>Parameters:</B><DD><CODE>sizeNeeded</CODE> - the number of bytes desired.</DL> </DD> </DL> <HR> <A NAME="addSize(int)"><!-- --></A><H3> addSize</H3> <PRE> public void <B>addSize</B>(int sizeAdded)</PRE> <DL> <DD>Skip the given number of bytes in the buffer. <P> <DD><DL> <DT><B>Parameters:</B><DD><CODE>sizeAdded</CODE> - number of bytes to skip.</DL> </DD> </DL> <!-- ========= END OF CLASS DATA ========= --> <HR> <!-- ======= START OF BOTTOM NAVBAR ====== --> <A NAME="navbar_bottom"><!-- --></A> <A HREF="#skip-navbar_bottom" title="Skip navigation links"></A> <TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY=""> <TR> <TD COLSPAN=3 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A NAME="navbar_bottom_firstrow"><!-- --></A> <TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY=""> <TR ALIGN="center" VALIGN="top"> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD> <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="class-use/FastOutputStream.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD> </TR> </TABLE> </TD> <TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM> <b>Berkeley DB</b><br><font size="-1"> version 4.3.21</font></EM> </TD> </TR> <TR> <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> <A HREF="../../../com/sleepycat/util/FastInputStream.html" title="class in com.sleepycat.util"><B>PREV CLASS</B></A> <A HREF="../../../com/sleepycat/util/UtfOps.html" title="class in com.sleepycat.util"><B>NEXT CLASS</B></A></FONT></TD> <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> <A HREF="../../../index.html" target="_top"><B>FRAMES</B></A> <A HREF="FastOutputStream.html" target="_top"><B>NO FRAMES</B></A> <SCRIPT type="text/javascript"> <!-- if(window==top) { document.writeln('<A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A>'); } //--> </SCRIPT> <NOSCRIPT> <A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A> </NOSCRIPT> </FONT></TD> </TR> <TR> <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> SUMMARY: NESTED | <A HREF="#field_summary">FIELD</A> | <A HREF="#constructor_summary">CONSTR</A> | <A HREF="#method_summary">METHOD</A></FONT></TD> <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> DETAIL: <A HREF="#field_detail">FIELD</A> | <A HREF="#constructor_detail">CONSTR</A> | <A HREF="#method_detail">METHOD</A></FONT></TD> </TR> </TABLE> <A NAME="skip-navbar_bottom"></A> <!-- ======== END OF BOTTOM NAVBAR ======= --> <HR> <font size=1><a href="../../../../sleepycat/legal.html">Copyright (c) 1996-2004</a> <a href="http://www.sleepycat.com">Sleepycat Software, Inc.</a> - All rights reserved.</font> </BODY> </HTML>