title: In Java: is where a way to create a subarray that will point to a portion of a bigger array?
body: <p>Learning Java, so be gentle please. Ideally I need to create an array of bytes that will point to a portion of a bigger array:</p>
  
  <pre><code>byte[] big  = new byte[1000];
  
  // C-style code starts
  load(file,big);
  
  byte[100] sub = big + 200; 
  
  // C-style code ends
  </code></pre>
  
  <p>I know this is not possible in Java and there are two work-arounds that come to mind and would include:</p>
  
  <ol>
  <li><p>Either copying portion of <em>big</em> into <em>sub</em> iterating through <em>big</em>.</p></li>
  <li><p>Or writting own class that will take a reference to <em>big + offset + size</em> and implementing the "subarray" through accessor methods using <em>big</em> as the actual underlying data structure.</p></li>
  </ol>
  
  <p>The task I am trying to solve is to load a file into memory an then gain read-only access to the records stored withing the file through a class. The speed is paramount, hence ideally I'd like to avoid copying or accessor methods. And since I'm learning Java, I'd like to stick with it.</p>
  
  <p>Any other alternatives I've got? Please do ask questions if I didn't explain the task well enough.</p>