title: using fileinputstream to get part of encrypted file
body: <p>I'm trying to decrypt a large file using
   <a href="https://github.com/martinwithaar/Encryptor4j/blob/master/src/main/java/org/encryptor4j/util/FileEncryptor.java" rel="nofollow noreferrer">https://github.com/martinwithaar/Encryptor4j/blob/master/src/main/java/org/encryptor4j/util/FileEncryptor.java</a>
  the following is part of decrypt method that i modified </p>
  
  <pre><code>                //the following does not work 
                  FileInputStream fis=new FileInputStream(src);
                  fis.skip(83);
                  is = encryptor.wrapInputStream(fis);
                  os = new FileOutputStream(dest);
                  //the copy method is a default method from FileEncryptor.java
                  copy(is, os);
  </code></pre>
  
  <p>the following works fine.(i have to decrypt entire file and then read/save part of file to another file then delete the old one and rename the new one to the old file name.</p>
  
  <pre><code>                is = encryptor.wrapInputStream(new FileInputStream(src));
                  os = new FileOutputStream(dest);
  
                  copy(is, os);
  
                  FileInputStream fis=new FileInputStream(dest);
                  fis.skip(67);
                  FileOutputStream fos=new FileOutputStream(dest+".2");
                  copy(fis,fos);
                  new File(dest).delete();
                  new File(dest+".2").renameTo(new File(dest));
  
                  fis.close();
                  fos.close();
  </code></pre>
  
  <p>my question is, why the code on top does not work? 
  I followed <a href="http://www.tutorialspoint.com/java/io/fileinputstream_skip.htm" rel="nofollow noreferrer">http://www.tutorialspoint.com/java/io/fileinputstream_skip.htm</a> on how to skip some bytes.</p>