Sophie

Sophie

distrib > Mandriva > 2010.1 > x86_64 > media > main-release > by-pkgid > bc1980b66a68f286299491ee8724e71c > files > 464

db4.7-4.7.25-6mdv2010.1.x86_64.rpm

<!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.6.0_0) on Wed Dec 30 04:50:33 EST 2009 -->
<TITLE>
FastOutputStream
</TITLE>

<META NAME="date" CONTENT="2009-12-30">

<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../stylesheet.css" TITLE="Style">

<SCRIPT type="text/javascript">
function windowTitle()
{
    if (location.href.indexOf('is-external=true') == -1) {
        parent.document.title="FastOutputStream";
    }
}
</SCRIPT>
<NOSCRIPT>
</NOSCRIPT>

</HEAD>

<BODY BGCOLOR="white" onload="windowTitle();">
<HR>


<!-- ========= 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=2 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>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
  </TR>
</TABLE>
</TD>
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
</EM>
</TD>
</TR>

<TR>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
&nbsp;<A HREF="../../../com/sleepycat/util/FastInputStream.html" title="class in com.sleepycat.util"><B>PREV CLASS</B></A>&nbsp;
&nbsp;<A HREF="../../../com/sleepycat/util/IOExceptionWrapper.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?com/sleepycat/util/FastOutputStream.html" target="_top"><B>FRAMES</B></A>  &nbsp;
&nbsp;<A HREF="FastOutputStream.html" target="_top"><B>NO FRAMES</B></A>  &nbsp;
&nbsp;<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:&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>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
DETAIL:&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>
</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>
java.lang.Object
  <IMG SRC="../../../resources/inherit.gif" ALT="extended by ">java.io.OutputStream
      <IMG SRC="../../../resources/inherit.gif" ALT="extended by "><B>com.sleepycat.util.FastOutputStream</B>
</PRE>
<DL>
<DT><B>All Implemented Interfaces:</B> <DD>java.io.Closeable, java.io.Flushable</DD>
</DL>
<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><PRE>public class <B>FastOutputStream</B><DT>extends java.io.OutputStream</DL>
</PRE>

<P>
A replacement for ByteArrayOutputStream that does not synchronize every
 byte read.

 <p>This class extends <CODE>OutputStream</CODE> 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>
<!-- =========== FIELD SUMMARY =========== -->

<A NAME="field_summary"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
<B>Field Summary</B></FONT></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&nbsp;int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../com/sleepycat/util/FastOutputStream.html#DEFAULT_BUMP_SIZE">DEFAULT_BUMP_SIZE</A></B></CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;The default amount that the buffer is increased when it is full.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&nbsp;int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../com/sleepycat/util/FastOutputStream.html#DEFAULT_INIT_SIZE">DEFAULT_INIT_SIZE</A></B></CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;The default initial size of the buffer if no initialSize parameter is
 specified.</TD>
</TR>
</TABLE>
&nbsp;
<!-- ======== CONSTRUCTOR SUMMARY ======== -->

<A NAME="constructor_summary"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
<B>Constructor Summary</B></FONT></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><B><A HREF="../../../com/sleepycat/util/FastOutputStream.html#FastOutputStream()">FastOutputStream</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;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[]&nbsp;buffer)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;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[]&nbsp;buffer,
                 int&nbsp;bumpSize)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;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&nbsp;initialSize)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;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&nbsp;initialSize,
                 int&nbsp;bumpSize)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Creates an output stream with a given bump size and initial size.</TD>
</TR>
</TABLE>
&nbsp;
<!-- ========== METHOD SUMMARY =========== -->

<A NAME="method_summary"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
<B>Method Summary</B></FONT></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../com/sleepycat/util/FastOutputStream.html#addSize(int)">addSize</A></B>(int&nbsp;sizeAdded)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;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>&nbsp;byte[]</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../com/sleepycat/util/FastOutputStream.html#getBufferBytes()">getBufferBytes</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;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>&nbsp;int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../com/sleepycat/util/FastOutputStream.html#getBufferLength()">getBufferLength</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;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>&nbsp;int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../com/sleepycat/util/FastOutputStream.html#getBufferOffset()">getBufferOffset</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;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>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../com/sleepycat/util/FastOutputStream.html#makeSpace(int)">makeSpace</A></B>(int&nbsp;sizeNeeded)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;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>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../com/sleepycat/util/FastOutputStream.html#reset()">reset</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../com/sleepycat/util/FastOutputStream.html#size()">size</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;byte[]</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../com/sleepycat/util/FastOutputStream.html#toByteArray()">toByteArray</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;java.lang.String</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../com/sleepycat/util/FastOutputStream.html#toString()">toString</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;java.lang.String</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../com/sleepycat/util/FastOutputStream.html#toString(java.lang.String)">toString</A></B>(java.lang.String&nbsp;encoding)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../com/sleepycat/util/FastOutputStream.html#write(byte[])">write</A></B>(byte[]&nbsp;fromBuf)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../com/sleepycat/util/FastOutputStream.html#write(byte[], int, int)">write</A></B>(byte[]&nbsp;fromBuf,
      int&nbsp;offset,
      int&nbsp;length)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../com/sleepycat/util/FastOutputStream.html#write(int)">write</A></B>(int&nbsp;b)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../com/sleepycat/util/FastOutputStream.html#writeFast(byte[])">writeFast</A></B>(byte[]&nbsp;fromBuf)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;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>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../com/sleepycat/util/FastOutputStream.html#writeFast(byte[], int, int)">writeFast</A></B>(byte[]&nbsp;fromBuf,
          int&nbsp;offset,
          int&nbsp;length)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;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>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../com/sleepycat/util/FastOutputStream.html#writeFast(int)">writeFast</A></B>(int&nbsp;b)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;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>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../com/sleepycat/util/FastOutputStream.html#writeTo(java.io.OutputStream)">writeTo</A></B>(java.io.OutputStream&nbsp;out)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
</TR>
</TABLE>
&nbsp;<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">
<TH ALIGN="left"><B>Methods inherited from class java.io.OutputStream</B></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE>close, flush</CODE></TD>
</TR>
</TABLE>
&nbsp;<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">
<TH ALIGN="left"><B>Methods inherited from class java.lang.Object</B></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE>clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait</CODE></TD>
</TR>
</TABLE>
&nbsp;
<P>

<!-- ============ FIELD DETAIL =========== -->

<A NAME="field_detail"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
<B>Field Detail</B></FONT></TH>
</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>
<DD>The default initial size of the buffer if no initialSize parameter is
 specified.  This constant is 100 bytes.
<P>
<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>
<DD>The default amount that the buffer is increased when it is full.  This
 constant is zero, which means to double the current buffer size.
<P>
<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">
<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
<B>Constructor Detail</B></FONT></TH>
</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&nbsp;initialSize)</PRE>
<DL>
<DD>Creates an output stream with a default bump size and a given initial
 size.
<P>
<DL>
<DT><B>Parameters:</B><DD><CODE>initialSize</CODE> - the initial size of the buffer.</DL>
</DL>
<HR>

<A NAME="FastOutputStream(int, int)"><!-- --></A><H3>
FastOutputStream</H3>
<PRE>
public <B>FastOutputStream</B>(int&nbsp;initialSize,
                        int&nbsp;bumpSize)</PRE>
<DL>
<DD>Creates an output stream with a given bump size and initial size.
<P>
<DL>
<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>
</DL>
<HR>

<A NAME="FastOutputStream(byte[])"><!-- --></A><H3>
FastOutputStream</H3>
<PRE>
public <B>FastOutputStream</B>(byte[]&nbsp;buffer)</PRE>
<DL>
<DD>Creates an output stream with a given initial buffer and a default
 bump size.
<P>
<DL>
<DT><B>Parameters:</B><DD><CODE>buffer</CODE> - the initial buffer; will be owned by this object.</DL>
</DL>
<HR>

<A NAME="FastOutputStream(byte[], int)"><!-- --></A><H3>
FastOutputStream</H3>
<PRE>
public <B>FastOutputStream</B>(byte[]&nbsp;buffer,
                        int&nbsp;bumpSize)</PRE>
<DL>
<DD>Creates an output stream with a given initial buffer and a given
 bump size.
<P>
<DL>
<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
 default), the current buffer size will be doubled when the buffer is
 full.</DL>
</DL>

<!-- ============ METHOD DETAIL ========== -->

<A NAME="method_detail"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
<B>Method Detail</B></FONT></TH>
</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&nbsp;b)
           throws java.io.IOException</PRE>
<DL>
<DD><DL>
<DT><B>Specified by:</B><DD><CODE>write</CODE> in class <CODE>java.io.OutputStream</CODE></DL>
</DD>
<DD><DL>

<DT><B>Throws:</B>
<DD><CODE>java.io.IOException</CODE></DL>
</DD>
</DL>
<HR>

<A NAME="write(byte[])"><!-- --></A><H3>
write</H3>
<PRE>
public void <B>write</B>(byte[]&nbsp;fromBuf)
           throws java.io.IOException</PRE>
<DL>
<DD><DL>
<DT><B>Overrides:</B><DD><CODE>write</CODE> in class <CODE>java.io.OutputStream</CODE></DL>
</DD>
<DD><DL>

<DT><B>Throws:</B>
<DD><CODE>java.io.IOException</CODE></DL>
</DD>
</DL>
<HR>

<A NAME="write(byte[], int, int)"><!-- --></A><H3>
write</H3>
<PRE>
public void <B>write</B>(byte[]&nbsp;fromBuf,
                  int&nbsp;offset,
                  int&nbsp;length)
           throws java.io.IOException</PRE>
<DL>
<DD><DL>
<DT><B>Overrides:</B><DD><CODE>write</CODE> in class <CODE>java.io.OutputStream</CODE></DL>
</DD>
<DD><DL>

<DT><B>Throws:</B>
<DD><CODE>java.io.IOException</CODE></DL>
</DD>
</DL>
<HR>

<A NAME="writeTo(java.io.OutputStream)"><!-- --></A><H3>
writeTo</H3>
<PRE>
public void <B>writeTo</B>(java.io.OutputStream&nbsp;out)
             throws java.io.IOException</PRE>
<DL>
<DD><DL>

<DT><B>Throws:</B>
<DD><CODE>java.io.IOException</CODE></DL>
</DD>
</DL>
<HR>

<A NAME="toString()"><!-- --></A><H3>
toString</H3>
<PRE>
public java.lang.String <B>toString</B>()</PRE>
<DL>
<DD><DL>
<DT><B>Overrides:</B><DD><CODE>toString</CODE> in class <CODE>java.lang.Object</CODE></DL>
</DD>
<DD><DL>
</DL>
</DD>
</DL>
<HR>

<A NAME="toString(java.lang.String)"><!-- --></A><H3>
toString</H3>
<PRE>
public java.lang.String <B>toString</B>(java.lang.String&nbsp;encoding)
                          throws java.io.UnsupportedEncodingException</PRE>
<DL>
<DD><DL>

<DT><B>Throws:</B>
<DD><CODE>java.io.UnsupportedEncodingException</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&nbsp;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[]&nbsp;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[]&nbsp;fromBuf,
                            int&nbsp;offset,
                            int&nbsp;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="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&nbsp;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&nbsp;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=2 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>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
  </TR>
</TABLE>
</TD>
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
</EM>
</TD>
</TR>

<TR>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
&nbsp;<A HREF="../../../com/sleepycat/util/FastInputStream.html" title="class in com.sleepycat.util"><B>PREV CLASS</B></A>&nbsp;
&nbsp;<A HREF="../../../com/sleepycat/util/IOExceptionWrapper.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?com/sleepycat/util/FastOutputStream.html" target="_top"><B>FRAMES</B></A>  &nbsp;
&nbsp;<A HREF="FastOutputStream.html" target="_top"><B>NO FRAMES</B></A>  &nbsp;
&nbsp;<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:&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>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
DETAIL:&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>
</TR>
</TABLE>
<A NAME="skip-navbar_bottom"></A>
<!-- ======== END OF BOTTOM NAVBAR ======= -->

<HR>

</BODY>
</HTML>