code: private InputStream openInputStream(@NonNull final Uri stream, final String mimeType, final int mbrSize, final int types)
  			throws IOException {
  		final InputStream is = getContentResolver().openInputStream(stream);
  		if (MIME_TYPE_ZIP.equals(mimeType))
  			return new ArchiveInputStream(is, mbrSize, types);
  
  		final String[] projection = {MediaStore.Images.Media.DISPLAY_NAME};
  		final Cursor cursor = getContentResolver().query(stream, projection, null, null, null);
  		try {
  			if (cursor.moveToNext()) {
  				final String fileName = cursor.getString(0 /* DISPLAY_NAME*/);
  
  				if (fileName.toLowerCase(Locale.US).endsWith("hex"))
  					return new HexInputStream(is, mbrSize);
  			}
  		} finally {
  			cursor.close();
  		}
  		return is;
  	}
docs: Opens the binary input stream. A Uri to the stream is given.
  
  @param stream   the Uri to the stream.
  @param mimeType the file type.
  @param mbrSize  the size of MBR, by default 0x1000.
  @param types    the content files types in ZIP.
  @return The input stream with binary image content.