# CSJ2K.j2k.entropy.encoder.ByteOutputBuffer

## Content

<div class="doc-site-dotnet-api-container">



  <h1 id="CSJ2K_j2k_entropy_encoder_ByteOutputBuffer" data-uid="CSJ2K.j2k.entropy.encoder.ByteOutputBuffer" class="text-break">ByteOutputBuffer Class
</h1>
  <div class="markdown level0 summary"><p>This class provides a buffering output stream similar to
ByteArrayOutputStream, with some additional methods.</p>
<pre><code>       &lt;p&gt;Once an array has been written to an output stream or to a byte array,
       the object can be reused as a new stream if the reset() method is
       called.&lt;/p&gt;&lt;p&gt;Unlike the ByteArrayOutputStream class, this class is not thread
       safe.&lt;/p&gt;
</code></pre>
</div>
  <div class="markdown level0 conceptual"></div>
  <div class="inheritance">
    <h5>Inheritance</h5>
    <div class="level0"><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object">object</a></div>
    <div class="level1"><span class="xref">ByteOutputBuffer</span></div>
  </div>
  <h6><strong>Namespace</strong>: <a class="xref" href="CSJ2K.j2k.entropy.encoder.html">CSJ2K.j2k.entropy.encoder</a></h6>
  <h6><strong>Assembly</strong>: C1.WPF.ReportViewer.4.6.2.dll</h6>
  <h5 id="CSJ2K_j2k_entropy_encoder_ByteOutputBuffer_syntax">Syntax</h5>
  <div class="codewrapper">
    <pre><code class="lang-csharp hljs">public class ByteOutputBuffer</code></pre>
  </div>
  <div class="codewrapper">
    <pre><code class="lang-vbnet hljs">Public Class ByteOutputBuffer</code></pre>
  </div>
  <h3 id="constructors">Constructors
</h3>
  <table class="table table-bordered table-condensed">
    <thead>
      <tr>
        <th>Name</th>
        <th>Description</th>
      </tr>
    </thead>
    <tbody>
      <tr>
        <td id="CSJ2K_j2k_entropy_encoder_ByteOutputBuffer__ctor" data-uid="CSJ2K.j2k.entropy.encoder.ByteOutputBuffer.#ctor">
          <a class="xref" href="CSJ2K.j2k.entropy.encoder.ByteOutputBuffer.-ctor.html#CSJ2K_j2k_entropy_encoder_ByteOutputBuffer__ctor">ByteOutputBuffer()</a>
        </td>
        <td class="markdown level1 summary"><p>Creates a new byte array output stream. The buffer capacity is
initially BUF_DEF_LEN bytes, though its size increases if necessary.</p>
</td>
      </tr>
      <tr>
        <td id="CSJ2K_j2k_entropy_encoder_ByteOutputBuffer__ctor_System_Int32_" data-uid="CSJ2K.j2k.entropy.encoder.ByteOutputBuffer.#ctor(System.Int32)">
          <a class="xref" href="CSJ2K.j2k.entropy.encoder.ByteOutputBuffer.-ctor.html#CSJ2K_j2k_entropy_encoder_ByteOutputBuffer__ctor_System_Int32_">ByteOutputBuffer(int)</a>
        </td>
        <td class="markdown level1 summary"><p>Creates a new byte array output stream, with a buffer capacity of the
specified size, in bytes.</p>
</td>
      </tr>
    </tbody>
  </table>
  <h3 id="fields">Fields
</h3>
  <table class="table table-bordered table-condensed">
    <thead>
      <tr>
        <th>Name</th>
        <th>Description</th>
      </tr>
    </thead>
    <tbody>
      <tr>
        <td id="CSJ2K_j2k_entropy_encoder_ByteOutputBuffer_BUF_DEF_LEN" data-uid="CSJ2K.j2k.entropy.encoder.ByteOutputBuffer.BUF_DEF_LEN">
          <a class="xref" href="CSJ2K.j2k.entropy.encoder.ByteOutputBuffer.BUF_DEF_LEN.html">BUF_DEF_LEN</a>
        </td>
        <td class="markdown level1 summary"><p>The default initial buffer size</p>
</td>
      </tr>
      <tr>
        <td id="CSJ2K_j2k_entropy_encoder_ByteOutputBuffer_BUF_INC" data-uid="CSJ2K.j2k.entropy.encoder.ByteOutputBuffer.BUF_INC">
          <a class="xref" href="CSJ2K.j2k.entropy.encoder.ByteOutputBuffer.BUF_INC.html">BUF_INC</a>
        </td>
        <td class="markdown level1 summary"><p>The buffer increase size</p>
</td>
      </tr>
    </tbody>
  </table>
  <h3 id="methods">Methods
</h3>
  <table class="table table-bordered table-condensed">
    <thead>
      <tr>
        <th>Name</th>
        <th>Description</th>
      </tr>
    </thead>
    <tbody>
      <tr>
        <td id="CSJ2K_j2k_entropy_encoder_ByteOutputBuffer_getByte_System_Int32_" data-uid="CSJ2K.j2k.entropy.encoder.ByteOutputBuffer.getByte(System.Int32)">
          <a class="xref" href="CSJ2K.j2k.entropy.encoder.ByteOutputBuffer.getByte.html#CSJ2K_j2k_entropy_encoder_ByteOutputBuffer_getByte_System_Int32_">getByte(int)</a>
        </td>
        <td class="markdown level1 summary"><p>Returns the byte buffered at the given position in the buffer. The
position in the buffer is the index of the 'write()' method call after
the last call to 'reset()'.</p>
</td>
      </tr>
      <tr>
        <td id="CSJ2K_j2k_entropy_encoder_ByteOutputBuffer_reset" data-uid="CSJ2K.j2k.entropy.encoder.ByteOutputBuffer.reset">
          <a class="xref" href="CSJ2K.j2k.entropy.encoder.ByteOutputBuffer.reset.html#CSJ2K_j2k_entropy_encoder_ByteOutputBuffer_reset">reset()</a>
        </td>
        <td class="markdown level1 summary"><p>Discards all the buffered data, by resetting the counter of written
bytes to 0.</p>
</td>
      </tr>
      <tr>
        <td id="CSJ2K_j2k_entropy_encoder_ByteOutputBuffer_size" data-uid="CSJ2K.j2k.entropy.encoder.ByteOutputBuffer.size">
          <a class="xref" href="CSJ2K.j2k.entropy.encoder.ByteOutputBuffer.size.html#CSJ2K_j2k_entropy_encoder_ByteOutputBuffer_size">size()</a>
        </td>
        <td class="markdown level1 summary"><p>Returns the number of valid bytes in the output buffer (count class
variable).</p>
</td>
      </tr>
      <tr>
        <td id="CSJ2K_j2k_entropy_encoder_ByteOutputBuffer_toByteArray_System_Int32_System_Int32_System_Byte___System_Int32_" data-uid="CSJ2K.j2k.entropy.encoder.ByteOutputBuffer.toByteArray(System.Int32,System.Int32,System.Byte[],System.Int32)">
          <a class="xref" href="CSJ2K.j2k.entropy.encoder.ByteOutputBuffer.toByteArray.html#CSJ2K_j2k_entropy_encoder_ByteOutputBuffer_toByteArray_System_Int32_System_Int32_System_Byte___System_Int32_">toByteArray(int, int, byte[], int)</a>
        </td>
        <td class="markdown level1 summary"><p>Copies the specified part of the stream to the 'outbuf' byte array.</p>
</td>
      </tr>
      <tr>
        <td id="CSJ2K_j2k_entropy_encoder_ByteOutputBuffer_write_System_Int32_" data-uid="CSJ2K.j2k.entropy.encoder.ByteOutputBuffer.write(System.Int32)">
          <a class="xref" href="CSJ2K.j2k.entropy.encoder.ByteOutputBuffer.write.html#CSJ2K_j2k_entropy_encoder_ByteOutputBuffer_write_System_Int32_">write(int)</a>
        </td>
        <td class="markdown level1 summary"><p>Writes the specified byte to this byte array output stream. The
functionality provided by this implementation is the same as for the
one in the superclass, however this method is not synchronized and
therefore not safe thread, but faster.</p>
</td>
      </tr>
    </tbody>
  </table>
  <h3 id="seealso">See Also</h3>
  <div class="seealso">
      <div><a class="xref" href="CSJ2K.j2k.entropy.encoder.ByteOutputBuffer.reset.html#CSJ2K_j2k_entropy_encoder_ByteOutputBuffer_reset">reset</a>()</div>
  </div>

</div>
