code: private InputStream openInputStream(final int resId, final String mimeType, final int mbrSize, final int types)
  			throws IOException {
  		final InputStream is = getResources().openRawResource(resId);
  		if (MIME_TYPE_ZIP.equals(mimeType))
  			return new ArchiveInputStream(is, mbrSize, types);
  		is.mark(2);
  		int firstByte = is.read();
  		is.reset();
  		if (firstByte == ':')
  			return new HexInputStream(is, mbrSize);
  		return is;
  	}
docs: Opens the binary input stream that returns the firmware image content.
  A resource id in the res/raw is given.
  
  @param resId the if of the resource file.
  @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.