code: static String checkSurroundByQuotes(String delimiter, String trimmedText) throws IOException {
          boolean containsDelimiter = stringContainsItemFromList(trimmedText, delimiter, "\n", "\t", "\r", "\"");
          String trimmedTextWithoutQuotesDuplicates = trimmedText.replace("\"", "\"\"");
          if (containsDelimiter && trimmedTextWithoutQuotesDuplicates.length() != 0) {
              return "\"" + trimmedTextWithoutQuotesDuplicates + "\"";
          }
          return trimmedTextWithoutQuotesDuplicates;
      }
docs: The method to output a text represented by an array of bytes.
  If the text contains the delimiter, line breaks, tabulation characters, and double quotes, the text is stropped.
  
  @param delimiter   if trimmedText contains this delimiter it will be stropped.
  @param trimmedText the array of bytes that contains the text to output.
  @return string represented by an array of bytes.
  @throws java.io.IOException appears if the output into writer is impossible.