194 } 195 } 196 197 /** 198 * The <code>DataFlavor</code> representing a Java Unicode String class, 199 * where: 200 * <pre> 201 * representationClass = java.lang.String 202 * mimeType = "application/x-java-serialized-object" 203 * </pre> 204 */ 205 public static final DataFlavor stringFlavor = createConstant(java.lang.String.class, "Unicode String"); 206 207 /** 208 * The <code>DataFlavor</code> representing a Java Image class, 209 * where: 210 * <pre> 211 * representationClass = java.awt.Image 212 * mimeType = "image/x-java-image" 213 * </pre> 214 */ 215 public static final DataFlavor imageFlavor = createConstant("image/x-java-image; class=java.awt.Image", "Image"); 216 217 /** 218 * The <code>DataFlavor</code> representing plain text with Unicode 219 * encoding, where: 220 * <pre> 221 * representationClass = InputStream 222 * mimeType = "text/plain; charset=unicode" 223 * </pre> 224 * This <code>DataFlavor</code> has been <b>deprecated</b> because 225 * (1) Its representation is an InputStream, an 8-bit based representation, 226 * while Unicode is a 16-bit character set; and (2) The charset "unicode" 227 * is not well-defined. "unicode" implies a particular platform's 228 * implementation of Unicode, not a cross-platform implementation. 229 * 230 * @deprecated as of 1.3. Use <code>DataFlavor.getReaderForText(Transferable)</code> 231 * instead of <code>Transferable.getTransferData(DataFlavor.plainTextFlavor)</code>. 232 */ 233 @Deprecated | 194 } 195 } 196 197 /** 198 * The <code>DataFlavor</code> representing a Java Unicode String class, 199 * where: 200 * <pre> 201 * representationClass = java.lang.String 202 * mimeType = "application/x-java-serialized-object" 203 * </pre> 204 */ 205 public static final DataFlavor stringFlavor = createConstant(java.lang.String.class, "Unicode String"); 206 207 /** 208 * The <code>DataFlavor</code> representing a Java Image class, 209 * where: 210 * <pre> 211 * representationClass = java.awt.Image 212 * mimeType = "image/x-java-image" 213 * </pre> 214 * Will be {@code null} if {@code java.awt.Image} is not visible, the 215 * {@code java.desktop} module is not loaded, or the {@code java.desktop} 216 * module is not in the run-time image. 217 */ 218 public static final DataFlavor imageFlavor = createConstant("image/x-java-image; class=java.awt.Image", "Image"); 219 220 /** 221 * The <code>DataFlavor</code> representing plain text with Unicode 222 * encoding, where: 223 * <pre> 224 * representationClass = InputStream 225 * mimeType = "text/plain; charset=unicode" 226 * </pre> 227 * This <code>DataFlavor</code> has been <b>deprecated</b> because 228 * (1) Its representation is an InputStream, an 8-bit based representation, 229 * while Unicode is a 16-bit character set; and (2) The charset "unicode" 230 * is not well-defined. "unicode" implies a particular platform's 231 * implementation of Unicode, not a cross-platform implementation. 232 * 233 * @deprecated as of 1.3. Use <code>DataFlavor.getReaderForText(Transferable)</code> 234 * instead of <code>Transferable.getTransferData(DataFlavor.plainTextFlavor)</code>. 235 */ 236 @Deprecated |