# CSJ2K.j2k.entropy.decoder.ByteInputBuffer.setByteArray

## Content

<div class="doc-site-dotnet-api-container">



<h1 id="CSJ2K_j2k_entropy_decoder_ByteInputBuffer_setByteArray_" data-uid="CSJ2K.j2k.entropy.decoder.ByteInputBuffer.setByteArray*">setByteArray Method
</h1>
<div class="markdown level0 summary"></div>
<div class="markdown level0 conceptual"></div>



<a id="CSJ2K_j2k_entropy_decoder_ByteInputBuffer_setByteArray_" data-uid="CSJ2K.j2k.entropy.decoder.ByteInputBuffer.setByteArray*"></a>
<h4 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)">setByteArray(byte[], int, int)</h4>
<div 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>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public virtual void setByteArray(byte[] buf, int offset, int length)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Overridable Sub setByteArray(buf As Byte(), offset As Integer, length As Integer)</code></pre>
</div>
<h5 class="parameters">Parameters</h5>
<table class="table table-bordered table-condensed">
  <thead>
    <tr>
      <th>Type</th>
      <th>Name</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.byte">byte</a>[]</td>
      <td><span class="parametername">buf</span></td>
      <td><p>the input buffer. If null it is the current input buffer.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.int32">int</a></td>
      <td><span class="parametername">offset</span></td>
      <td><p>the offset in the buffer of the first byte to read. If
negative it is assumed to be the byte just after the end of the current
input buffer, only permitted if 'buf' is null.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.int32">int</a></td>
      <td><span class="parametername">length</span></td>
      <td><p>the maximum number of bytes to read frmo the buffer.</p>
</td>
    </tr>
  </tbody>
</table>
</div>
