# CSJ2K.j2k.io.RandomAccessIO

## Content

<div class="doc-site-dotnet-api-container">



  <h1 id="CSJ2K_j2k_io_RandomAccessIO" data-uid="CSJ2K.j2k.io.RandomAccessIO" class="text-break">RandomAccessIO Interface
</h1>
  <div class="markdown level0 summary"><p>This abstract class defines the interface to perform random access I/O. It
implements the <tt>BinaryDataInput</tt> and <tt>BinaryDataOutput</tt>
interfaces so that binary data input/output can be performed.</p>
<pre><code>       &lt;p&gt;This interface supports streams of up to 2 GB in length.&lt;/p&gt;
</code></pre>
</div>
  <div class="markdown level0 conceptual"></div>
  <h6><strong>Namespace</strong>: <a class="xref" href="CSJ2K.j2k.io.html">CSJ2K.j2k.io</a></h6>
  <h6><strong>Assembly</strong>: C1.WPF.ReportViewer.4.6.2.dll</h6>
  <h5 id="CSJ2K_j2k_io_RandomAccessIO_syntax">Syntax</h5>
  <div class="codewrapper">
    <pre><code class="lang-csharp hljs">public interface RandomAccessIO : BinaryDataInput, BinaryDataOutput</code></pre>
  </div>
  <div class="codewrapper">
    <pre><code class="lang-vbnet hljs">Public Interface RandomAccessIO
    Inherits BinaryDataInput, BinaryDataOutput</code></pre>
  </div>
  <h3 id="properties">Properties
</h3>
  <table class="table table-bordered table-condensed">
    <thead>
      <tr>
        <th>Name</th>
        <th>Description</th>
      </tr>
    </thead>
    <tbody>
      <tr>
        <td id="CSJ2K_j2k_io_RandomAccessIO_Pos" data-uid="CSJ2K.j2k.io.RandomAccessIO.Pos">
          <a class="xref" href="CSJ2K.j2k.io.RandomAccessIO.Pos.html#CSJ2K_j2k_io_RandomAccessIO_Pos">Pos</a>
        </td>
        <td class="markdown level1 summary"><p>Returns the current position in the stream, which is the position from
where the next byte of data would be read. The first byte in the stream
is in position <tt>0</tt>.</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_io_RandomAccessIO_close" data-uid="CSJ2K.j2k.io.RandomAccessIO.close">
          <a class="xref" href="CSJ2K.j2k.io.RandomAccessIO.close.html#CSJ2K_j2k_io_RandomAccessIO_close">close()</a>
        </td>
        <td class="markdown level1 summary"><p>Closes the I/O stream. Prior to closing the stream, any buffered data
(at the bit and byte level) should be written.</p>
</td>
      </tr>
      <tr>
        <td id="CSJ2K_j2k_io_RandomAccessIO_length" data-uid="CSJ2K.j2k.io.RandomAccessIO.length">
          <a class="xref" href="CSJ2K.j2k.io.RandomAccessIO.length.html#CSJ2K_j2k_io_RandomAccessIO_length">length()</a>
        </td>
        <td class="markdown level1 summary"><p>Returns the current length of the stream, in bytes, taking into account
any buffering.</p>
</td>
      </tr>
      <tr>
        <td id="CSJ2K_j2k_io_RandomAccessIO_read" data-uid="CSJ2K.j2k.io.RandomAccessIO.read">
          <a class="xref" href="CSJ2K.j2k.io.RandomAccessIO.read.html#CSJ2K_j2k_io_RandomAccessIO_read">read()</a>
        </td>
        <td class="markdown level1 summary"><p>Reads a byte of data from the stream. Prior to reading, the stream is
realigned at the byte level.</p>
</td>
      </tr>
      <tr>
        <td id="CSJ2K_j2k_io_RandomAccessIO_readFully_System_Byte___System_Int32_System_Int32_" data-uid="CSJ2K.j2k.io.RandomAccessIO.readFully(System.Byte[],System.Int32,System.Int32)">
          <a class="xref" href="CSJ2K.j2k.io.RandomAccessIO.readFully.html#CSJ2K_j2k_io_RandomAccessIO_readFully_System_Byte___System_Int32_System_Int32_">readFully(byte[], int, int)</a>
        </td>
        <td class="markdown level1 summary"><p>Reads up to len bytes of data from this file into an array of
bytes. This method reads repeatedly from the stream until all the bytes
are read. This method blocks until all the bytes are read, the end of
the stream is detected, or an exception is thrown.</p>
</td>
      </tr>
      <tr>
        <td id="CSJ2K_j2k_io_RandomAccessIO_seek_System_Int32_" data-uid="CSJ2K.j2k.io.RandomAccessIO.seek(System.Int32)">
          <a class="xref" href="CSJ2K.j2k.io.RandomAccessIO.seek.html#CSJ2K_j2k_io_RandomAccessIO_seek_System_Int32_">seek(int)</a>
        </td>
        <td class="markdown level1 summary"><p>Moves the current position for the next read or write operation to
offset. The offset is measured from the beginning of the stream. The
offset may be set beyond the end of the file, if in write mode. Setting
the offset beyond the end of the file does not change the file
length. The file length will change only by writing after the offset
has been set beyond the end of the file.</p>
</td>
      </tr>
      <tr>
        <td id="CSJ2K_j2k_io_RandomAccessIO_write_System_Byte_" data-uid="CSJ2K.j2k.io.RandomAccessIO.write(System.Byte)">
          <a class="xref" href="CSJ2K.j2k.io.RandomAccessIO.write.html#CSJ2K_j2k_io_RandomAccessIO_write_System_Byte_">write(byte)</a>
        </td>
        <td class="markdown level1 summary"><p>Writes a byte to the stream. Prior to writing, the stream is realigned
at the byte level.</p>
</td>
      </tr>
    </tbody>
  </table>
  <h3 id="seealso">See Also</h3>
  <div class="seealso">
      <div><a class="xref" href="CSJ2K.j2k.io.BinaryDataInput.html">BinaryDataInput</a></div>
      <div><a class="xref" href="CSJ2K.j2k.io.BinaryDataOutput.html">BinaryDataOutput</a></div>
  </div>

</div>
