title: .\key.p12: open failed: ENOENT (No such file or directory)
body: <p>In my android application  I'm accessing the Google cloud storage . I have generated the private key  <strong>xxxxxxxkey.p12</strong> .I have put my key file in assets folder . But while running the project it is not opening the key.p12 file . I have tried  putting it outside the assets folder , still no result.</p>
  
  <pre><code>     httpTransport = AndroidHttp.newCompatibleTransport(); 
              AssetManager am = getAssets();
              InputStream inputStream = am.open("xxxxxxxxxxKey.p12");
              File file = createFileFromInputStream(inputStream);
  
         GoogleCredential credential = new GoogleCredential.Builder()
                              .setTransport(httpTransport)
                              .setJsonFactory(JSON_FACTORY)
                              .setServiceAccountId(xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx@developer.gserviceaccount.com")
                              .setServiceAccountScopes(Collections.singleton(STORAGE_SCOPE))
                              .setServiceAccountPrivateKeyFromP12File(file).build();
  </code></pre>
  
  <p><strong>createFileFromInputStream()</strong></p>
  
  <pre><code>private File createFileFromInputStream(InputStream inputStream) {
  
          try {
              File f = new File("download/MyKey.p12");
              OutputStream outputStream = new FileOutputStream(f);
              byte buffer[] = new byte[1024];
              int length = 0;
  
              while ((length = inputStream.read(buffer)) &gt; 0) {
                  outputStream.write(buffer, 0, length);
              }
  
              outputStream.close();
              inputStream.close();
  
              return f;
          } catch (IOException e) {
              // Logging exception
          }
  
          return null;
      }
  </code></pre>
  
  <p>I've done the same in java project.What makes the difference, is it because of android ? or the path to the file location is incorrect?</p>