# CSJ2K.j2k.entropy.decoder.ByteInputBuffer

## Content

<div class="doc-site-dotnet-api-container">



  <h1 id="CSJ2K_j2k_entropy_decoder_ByteInputBuffer" data-uid="CSJ2K.j2k.entropy.decoder.ByteInputBuffer" class="text-break">ByteInputBuffer Class
</h1>
  <div class="markdown level0 summary"><p>This class provides a byte input facility from byte buffers. It is similar
to the ByteArrayInputStream class, but adds the possibility to add data to
the stream after the creation of the object.</p>
<pre><code>       &lt;p&gt;Unlike the ByteArrayInputStream this class is not thread safe (i.e. no
       two threads can use the same object at the same time, but different objects
       may be used in different threads).&lt;/p&gt;&lt;p&gt;This class can modify the contents of the buffer given to the
       constructor, when the addByteArray() method is called.&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">ByteInputBuffer</span></div>
  </div>
  <h6><strong>Namespace</strong>: <a class="xref" href="CSJ2K.j2k.entropy.decoder.html">CSJ2K.j2k.entropy.decoder</a></h6>
  <h6><strong>Assembly</strong>: C1.WPF.ReportViewer.4.6.2.dll</h6>
  <h5 id="CSJ2K_j2k_entropy_decoder_ByteInputBuffer_syntax">Syntax</h5>
  <div class="codewrapper">
    <pre><code class="lang-csharp hljs">public class ByteInputBuffer</code></pre>
  </div>
  <div class="codewrapper">
    <pre><code class="lang-vbnet hljs">Public Class ByteInputBuffer</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_decoder_ByteInputBuffer__ctor_System_Byte___" data-uid="CSJ2K.j2k.entropy.decoder.ByteInputBuffer.#ctor(System.Byte[])">
          <a class="xref" href="CSJ2K.j2k.entropy.decoder.ByteInputBuffer.-ctor.html#CSJ2K_j2k_entropy_decoder_ByteInputBuffer__ctor_System_Byte___">ByteInputBuffer(byte[])</a>
        </td>
        <td class="markdown level1 summary"><p>Creates a new byte array input stream that reads data from the
specified byte array. The byte array is not copied.</p>
</td>
      </tr>
      <tr>
        <td id="CSJ2K_j2k_entropy_decoder_ByteInputBuffer__ctor_System_Byte___System_Int32_System_Int32_" data-uid="CSJ2K.j2k.entropy.decoder.ByteInputBuffer.#ctor(System.Byte[],System.Int32,System.Int32)">
          <a class="xref" href="CSJ2K.j2k.entropy.decoder.ByteInputBuffer.-ctor.html#CSJ2K_j2k_entropy_decoder_ByteInputBuffer__ctor_System_Byte___System_Int32_System_Int32_">ByteInputBuffer(byte[], int, int)</a>
        </td>
        <td class="markdown level1 summary"><p>Creates a new byte array input stream that reads data from the
specified byte array. Up to length characters are to be read from the
byte array, starting at the indicated offset.</p>
<pre><code>       &lt;p&gt;The byte array is not copied.&lt;/p&gt;
</code></pre>
</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_decoder_ByteInputBuffer_addByteArray_System_Byte___System_Int32_System_Int32_" data-uid="CSJ2K.j2k.entropy.decoder.ByteInputBuffer.addByteArray(System.Byte[],System.Int32,System.Int32)">
          <a class="xref" href="CSJ2K.j2k.entropy.decoder.ByteInputBuffer.addByteArray.html#CSJ2K_j2k_entropy_decoder_ByteInputBuffer_addByteArray_System_Byte___System_Int32_System_Int32_">addByteArray(byte[], int, int)</a>
        </td>
        <td class="markdown level1 summary"><p>Adds the specified data to the end of the byte array stream. This
method modifies the byte array buffer. It can also discard the already
read input.</p>
</td>
      </tr>
      <tr>
        <td id="CSJ2K_j2k_entropy_decoder_ByteInputBuffer_read" data-uid="CSJ2K.j2k.entropy.decoder.ByteInputBuffer.read">
          <a class="xref" href="CSJ2K.j2k.entropy.decoder.ByteInputBuffer.read.html#CSJ2K_j2k_entropy_decoder_ByteInputBuffer_read">read()</a>
        </td>
        <td class="markdown level1 summary"><p>Reads the next byte of data from this input stream. The value byte is
returned as an int in the range 0 to 255. If no byte is available
because the end of the stream has been reached, -1 is returned.</p>
<pre><code>       &lt;p&gt;This method is not synchronized, so it is not thread safe.&lt;/p&gt;
</code></pre>
</td>
      </tr>
      <tr>
        <td id="CSJ2K_j2k_entropy_decoder_ByteInputBuffer_readChecked" data-uid="CSJ2K.j2k.entropy.decoder.ByteInputBuffer.readChecked">
          <a class="xref" href="CSJ2K.j2k.entropy.decoder.ByteInputBuffer.readChecked.html#CSJ2K_j2k_entropy_decoder_ByteInputBuffer_readChecked">readChecked()</a>
        </td>
        <td class="markdown level1 summary"><p>Reads the next byte of data from this input stream. The value byte is
returned as an int in the range 0 to 255. If no byte is available
because the end of the stream has been reached, the EOFException
exception is thrown.</p>
<pre><code>       &lt;p&gt;This method is not synchronized, so it is not thread safe.&lt;/p&gt;
</code></pre>
</td>
      </tr>
      <tr>
        <td id="CSJ2K_j2k_entropy_decoder_ByteInputBuffer_setByteArray_System_Byte___System_Int32_System_Int32_" data-uid="CSJ2K.j2k.entropy.decoder.ByteInputBuffer.setByteArray(System.Byte[],System.Int32,System.Int32)">
          <a class="xref" href="CSJ2K.j2k.entropy.decoder.ByteInputBuffer.setByteArray.html#CSJ2K_j2k_entropy_decoder_ByteInputBuffer_setByteArray_System_Byte___System_Int32_System_Int32_">setByteArray(byte[], int, int)</a>
        </td>
        <td class="markdown level1 summary"><p>Sets the underlying buffer byte array to the given one, with the given
offset and length. If 'buf' is null then the current byte buffer is
assumed. If 'offset' is negative, then it will be assumed to be
'off+len', where 'off' and 'len' are the offset and length of the
current byte buffer.</p>
<pre><code>       &lt;p&gt;The byte array is not copied.&lt;/p&gt;
</code></pre>
</td>
      </tr>
    </tbody>
  </table>

</div>
