# CSJ2K.j2k.io.BEBufferedRandomAccessFile.-ctor

## Content

<div class="doc-site-dotnet-api-container">



<h1 id="CSJ2K_j2k_io_BEBufferedRandomAccessFile__ctor_" data-uid="CSJ2K.j2k.io.BEBufferedRandomAccessFile.#ctor*">BEBufferedRandomAccessFile Constructor
</h1>
<div class="markdown level0 summary"></div>
<div class="markdown level0 conceptual"></div>



<a id="CSJ2K_j2k_io_BEBufferedRandomAccessFile__ctor_" data-uid="CSJ2K.j2k.io.BEBufferedRandomAccessFile.#ctor*"></a>
<h4 id="CSJ2K_j2k_io_BEBufferedRandomAccessFile__ctor_System_Object_System_String_System_Int32_" data-uid="CSJ2K.j2k.io.BEBufferedRandomAccessFile.#ctor(System.Object,System.String,System.Int32)">BEBufferedRandomAccessFile(object, string, int)</h4>
<div class="markdown level1 summary"><p>Constructor. Always needs a size for the buffer.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public BEBufferedRandomAccessFile(object file, string mode, int bufferSize)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Sub New(file As Object, mode As String, bufferSize 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.object">object</a></td>
      <td><span class="parametername">file</span></td>
      <td><p>The file associated with the buffer</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a></td>
      <td><span class="parametername">mode</span></td>
      <td><p>&quot;r&quot; for read, &quot;rw&quot; or &quot;rw+&quot; for read and write mode (&quot;rw+&quot;
opens the file for update whereas &quot;rw&quot; removes it
before. So the 2 modes are different only if the file
already exists).</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.int32">int</a></td>
      <td><span class="parametername">bufferSize</span></td>
      <td><p>The number of bytes to buffer</p>
</td>
    </tr>
  </tbody>
</table>


<a id="CSJ2K_j2k_io_BEBufferedRandomAccessFile__ctor_" data-uid="CSJ2K.j2k.io.BEBufferedRandomAccessFile.#ctor*"></a>
<h4 id="CSJ2K_j2k_io_BEBufferedRandomAccessFile__ctor_System_Object_System_String_" data-uid="CSJ2K.j2k.io.BEBufferedRandomAccessFile.#ctor(System.Object,System.String)">BEBufferedRandomAccessFile(object, string)</h4>
<div class="markdown level1 summary"><p>Constructor. Uses the default value for the byte-buffer size (512
bytes).</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public BEBufferedRandomAccessFile(object file, string mode)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Sub New(file As Object, mode As String)</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.object">object</a></td>
      <td><span class="parametername">file</span></td>
      <td><p>The file associated with the buffer</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a></td>
      <td><span class="parametername">mode</span></td>
      <td><p>&quot;r&quot; for read, &quot;rw&quot; or &quot;rw+&quot; for read and write mode (&quot;rw+&quot;
opens the file for update whereas &quot;rw&quot; removes it
before. So the 2 modes are different only if the file
already exists).</p>
</td>
    </tr>
  </tbody>
</table>


<a id="CSJ2K_j2k_io_BEBufferedRandomAccessFile__ctor_" data-uid="CSJ2K.j2k.io.BEBufferedRandomAccessFile.#ctor*"></a>
<h4 id="CSJ2K_j2k_io_BEBufferedRandomAccessFile__ctor_System_String_System_String_System_Int32_" data-uid="CSJ2K.j2k.io.BEBufferedRandomAccessFile.#ctor(System.String,System.String,System.Int32)">BEBufferedRandomAccessFile(string, string, int)</h4>
<div class="markdown level1 summary"><p>Constructor. Always needs a size for the buffer.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public BEBufferedRandomAccessFile(string name, string mode, int bufferSize)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Sub New(name As String, mode As String, bufferSize 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.string">string</a></td>
      <td><span class="parametername">name</span></td>
      <td><p>The name of the file associated with the buffer</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a></td>
      <td><span class="parametername">mode</span></td>
      <td><p>&quot;r&quot; for read, &quot;rw&quot; or &quot;rw+&quot; for read and write mode (&quot;rw+&quot;
opens the file for update whereas &quot;rw&quot; removes it
before. So the 2 modes are different only if the file
already exists).</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.int32">int</a></td>
      <td><span class="parametername">bufferSize</span></td>
      <td><p>The number of bytes to buffer</p>
</td>
    </tr>
  </tbody>
</table>


<a id="CSJ2K_j2k_io_BEBufferedRandomAccessFile__ctor_" data-uid="CSJ2K.j2k.io.BEBufferedRandomAccessFile.#ctor*"></a>
<h4 id="CSJ2K_j2k_io_BEBufferedRandomAccessFile__ctor_System_String_System_String_" data-uid="CSJ2K.j2k.io.BEBufferedRandomAccessFile.#ctor(System.String,System.String)">BEBufferedRandomAccessFile(string, string)</h4>
<div class="markdown level1 summary"><p>Constructor. Uses the default value for the byte-buffer size (512
bytes).</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public BEBufferedRandomAccessFile(string name, string mode)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Sub New(name As String, mode As String)</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.string">string</a></td>
      <td><span class="parametername">name</span></td>
      <td><p>The name of the file associated with the buffer</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a></td>
      <td><span class="parametername">mode</span></td>
      <td><p>&quot;r&quot; for read, &quot;rw&quot; or &quot;rw+&quot; for read and write mode (&quot;rw+&quot;
opens the file for update whereas &quot;rw&quot; removes it
before. So the 2 modes are different only if the file
already exists).</p>
</td>
    </tr>
  </tbody>
</table>
</div>
