public byte @NotNull [] getBytes() {
    if (myBytes != null) {
      return myBytes;
    }

    if (myTemporaryFile != null) {
      try {
        return Files.readAllBytes(myTemporaryFile);
      }
      catch (IOException e) {
        LOG.error("Failed to read attachment content from temp. file " + myTemporaryFile, e);
      }
    }

    if (myDisplayText != null) {
      return myDisplayText.getBytes(StandardCharsets.UTF_8);
    }

    return ArrayUtil.EMPTY_BYTE_ARRAY;
  }
public byte @NotNull [] getBytes()