title: android, save files in offline mode (parse.com)
body: <p>parse.com provide a way to save object in offline mode with object.saveEventually();
  call.. this stores object in local dataStore unless the syncing done with server.</p>
  
  <p>the problem is,I can not store file with below given lines</p>
  
  <pre><code>ByteArrayOutputStream stream = new ByteArrayOutputStream();
  bitmap.compress(Bitmap.CompressFormat.PNG, 80, stream);
  byte[] byteArray = stream.toByteArray();
  file = new ParseFile("pic.png",byteArray);  
  object.put("file.png", file);   
  object.saveEventually();
  </code></pre>
  
  <p>it gives following error</p>
  
  <pre><code>java.lang.IllegalStateException: Unable to encode an unsaved ParseFile
  </code></pre>
  
  <p>according to parse documentation to save file file.saveInBackground should be called...
  and I think saveInBackground only works when there is internet connection...</p>
  
  <p>but the thing which I want to implement is get data (object or file) from local dataStore until sync is done with server...</p>
  
  <p>so how can I save file in such a way in offline mode that I can access that file from local dataStore until the sync is done with the server... </p>