Data Flavors

Different applications interpret data differently, even the same kind of data. Most word processors support some form of formatted text with different fonts, styles, sizes, and so on. However, Microsoft Word 6.0 for Macintosh is not able to read formatted text produced by ClarisWorks and vice versa. Another example is Pictures from PhotoShop, which can be copied and pasted into many programs, but the layers tend to get flattened. The clipboard only understands raw bytes; it does not essentially know whether those bytes are text, a picture, a table, or something else. The java.awt.datatransfer. DataFlavor class uses MIME types and subtypes to identify the kind of data stored in the clipboard. MIME (Multipurpose Internet Mail Extensions) ...

Get JavaBeans Unleashed now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.