<commit_before>/*
 * 07/28/2008
 *
 * StyledTextTransferable.java - Used during drag-and-drop to represent RTF text.
 *
 * This library is distributed under a modified BSD license.  See the included
 * LICENSE file for details.
 */
package org.fife.ui.rsyntaxtextarea;

import java.awt.datatransfer.DataFlavor;
import java.awt.datatransfer.Transferable;
import java.awt.datatransfer.UnsupportedFlavorException;
import java.io.ByteArrayInputStream;
import java.io.IOException;
import java.io.StringReader;


/**
 * Object used during copy/paste and DnD operations to represent styled text.
 * It can return the text being moved as HTML, RTF or plain text.  This
 * class is basically the same as
 * <code>java.awt.datatransfer.StringSelection</code>, except that it can also
 * return the text in a couple of styled text formats.
 *
 * @author <NAME>
 * @version 1.0
 */
class StyledTextTransferable implements Transferable {

	/**
	 * The tranferred plain text
	 */
	private String plain;

	/**
	 * The transferred text, as HTML.
	 */
	private String html;

	/**
	 * The RTF data, in bytes (the RTF is 7-bit ascii).
	 */
	private byte[] rtfBytes;


	/**
	 * The "flavors" the text can be returned as.
	 */
	private static final DataFlavor[] FLAVORS = {<commit_msg>Correction in java-doc<commit_after>/*
 * 07/28/2008
 *
 * StyledTextTransferable.java - Used during drag-and-drop to represent RTF text.
 *
 * This library is distributed under a modified BSD license.  See the included
 * LICENSE file for details.
 */
package org.fife.ui.rsyntaxtextarea;

import java.awt.datatransfer.DataFlavor;
import java.awt.datatransfer.Transferable;
import java.awt.datatransfer.UnsupportedFlavorException;
import java.io.ByteArrayInputStream;
import java.io.IOException;
import java.io.StringReader;


/**
 * Object used during copy/paste and DnD operations to represent styled text.
 * It can return the text being moved as HTML, RTF or plain text.  This
 * class is basically the same as
 * <code>java.awt.datatransfer.StringSelection</code>, except that it can also
 * return the text in a couple of styled text formats.
 *
 * @author <NAME>
 * @version 1.0
 */
class StyledTextTransferable implements Transferable {

	/**
	 * The transferred plain text.
	 */
	private String plain;

	/**
	 * The transferred text, as HTML.
	 */
	private String html;

	/**
	 * The RTF data, in bytes (the RTF is 7-bit ascii).
	 */
	private byte[] rtfBytes;


	/**
	 * The "flavors" the text can be returned as.
	 */
	private static final DataFlavor[] FLAVORS = {
{'fraction_non_alphanumeric': 0.09767625049231982, 'fraction_numerical': 0.00866482867270579, 'mean_word_length': 3.6605504587155964, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 9, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5715085', 'n_tokens_mistral': 817, 'n_tokens_neox': 764, 'n_words': 274}