title: Java OutputStream Skip (offset)
body: <p>I am trying to write a function that takes File object, offset and byte array parameters and writes that byte array to a File object in Java.</p>
  
  <p>So the function would look like</p>
  
  <pre><code>public void write(File file, long offset, byte[] data)
  </code></pre>
  
  <p>But the problem is that the offset parameter is long type, so I can't use write() function of OutputStream, which takes integer as an offset.</p>
  
  <p>Unlike InputStream, which has skip(long), it seems OutputStream has no way to skip the first bytes of the file.</p>
  
  <p>Is there a good way to solve this problem?</p>
  
  <p>Thank you.</p>