title: What directory does FileOutputStream write to by default on Android
body: <p>I am working on android app in which I am using below code to copy file from asset. The code is working fine but I want to know where it is creating new file.</p>
  
  <pre><code>try {
      AssetManager am = getAssets();
      InputStream inputStream = am.open("key.p12");
      File file = createFileFromInputStream(inputStream);
  
      credential = new GoogleCredential.Builder().setTransport(TRANSPORT)
              .setJsonFactory(JSON_FACTORY)
              .setServiceAccountScopes(SCOPES)
              .setServiceAccountId("xxxxxxxxxxxxxxxx@developer.gserviceaccount.com")
              .setServiceAccountPrivateKeyFromP12File(file )
              .build();
  } catch (GeneralSecurityException | IOException e1) {
      e1.printStackTrace();
  }
  
  private File createFileFromInputStream(InputStream inputStream) {
  
     try{
        File f = new File("key.p12"); &lt;--- where it is creating a new file ??
        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>Thanks </p>