title: How to get Exif data from an InputStream rather than a File?
body: <p>The reason why I am asking this is because the callback of the file chooser <code>Intent</code> returns an <code>Uri</code>.</p>
  
  <p>Open file chooser via Intent:</p>
  
  <pre><code>Intent intent = new Intent();
  intent.setType("image/*");
  intent.setAction(Intent.ACTION_GET_CONTENT);
  startActivityForResult(Intent.createChooser(intent, "Select Picture"), CHOOSE_IMAGE_REQUEST);
  </code></pre>
  
  <p>Callback:</p>
  
  <pre><code>@Override
  public void onActivityResult(int requestCode, int resultCode, final Intent data) {
      super.onActivityResult(requestCode, resultCode, data);
  
      if (requestCode == CHOOSE_IMAGE_REQUEST &amp;&amp; resultCode == Activity.RESULT_OK) {
  
          if (data == null) {
              // Error
              return;
          }
  
          Uri fileUri = data.getData();
          InputStream in = getContentResolver().openInputStream(fileUri);
  
          // How to determine image orientation through Exif data here?
      }
  }
  </code></pre>
  
  <p>One way would be to write the <code>InputStream</code> to an actual <code>File</code>, but this seems like a bad workaround for me.</p>