Lines Matching defs:format

129  * array, given a source DataFlavor and a target format, and for translating
130 * a byte array or InputStream into an Object, given a source format and
583 * MIME parameters specific to the flavormap.properties file format.
587 Long format = getFormatForNativeAsLong(nat);
589 textNatives.add(format);
590 nativeCharsets.put(format, (charset != null && charset.length() != 0)
593 nativeEOLNs.put(format, eoln);
598 nativeTerminators.put(format, iTerminators);
604 * Determines whether the native corresponding to the specified long format
607 protected boolean isTextFormat(long format) {
608 return textNatives.contains(Long.valueOf(format));
617 * format is locale-dependent. If so, when decoding such text,
621 public abstract boolean isLocaleDependentTextFormat(long format);
625 * format is DataFlavor.javaFileListFlavor.
627 public abstract boolean isFileFormat(long format);
631 * format is DataFlavor.imageFlavor.
633 public abstract boolean isImageFormat(long format);
636 * Determines whether the format is a URI list we can convert to
639 protected boolean isURIListFormat(long format) {
647 * requested when converting to the format.
665 * when converting to the format.
679 * when converting to the format.
694 // Larger index value corresponds to the more preferable format.
776 * data in the specified format can be translated. The value of each key
777 * is the format in which the Clipboard or dropped data should be requested
780 public Map getFlavorsForFormat(long format, FlavorTable map) {
781 return getFlavorsForFormats(new long[] { format }, map);
787 * is the format in which the Clipboard or dropped data should be requested
803 long format = formats[i];
804 String nat = getNativeForFormat(format);
819 Long lFormat = Long.valueOf(format);
831 // Then map each flavor to the best format.
837 // map a flavor to the format for which the corresponding
838 // format-to-flavor mapping doesn't exist. For this reason we have built
839 // a mappingSet of all format-to-flavor mappings for the specified formats
840 // and check if the format-to-flavor mapping exists for the
841 // (flavor,format) pair being added.
905 * 1) a mapping from the specified format exists in the specified map and
912 * @param format the data format
917 public DataFlavor[] getFlavorsForFormatAsArray(long format,
919 return getFlavorsForFormatsAsArray(new long[] { format }, map);
962 * system and returns a long format corresponding to that native.
967 * Looks-up the String native corresponding to the specified long format in
970 protected abstract String getNativeForFormat(long format);
974 * format and localeTransferable(on decoding, if available)
1004 * target format. Append terminating NUL bytes.
1009 long format) throws IOException
1011 Long lFormat = Long.valueOf(format);
1039 // Encode text in target format.
1067 long format,
1078 Long lFormat = Long.valueOf(format);
1087 // for selected charset (clipboard format). It is not complitly true for
1162 * a byte array, given a source DataFlavor and target format.
1166 long format) throws IOException
1200 // target format. Append terminating NUL bytes.
1203 isFlavorCharsetTextType(flavor) && isTextFormat(format))) {
1209 format);
1214 if (!(isFlavorCharsetTextType(flavor) && isTextFormat(format))) {
1229 format);
1233 if (!(isFlavorCharsetTextType(flavor) && isTextFormat(format))) {
1245 format);
1249 if (!(isFlavorCharsetTextType(flavor) && isTextFormat(format))) {
1256 format);
1260 // reencode according to the requested format.
1267 if (isFlavorCharsetTextType(flavor) && isTextFormat(format)) {
1271 format);
1278 // reencode according to the requested format.
1282 if (isFlavorCharsetTextType(flavor) && isTextFormat(format)) {
1286 format);
1292 if (!isImageFormat(format)) {
1294 "not an image format");
1298 byte[] bytes = imageToPlatformBytes(image, format);
1302 "cannot convert java image to native format");
1311 if (isFileFormat(format)) {
1327 } else if (isURIListFormat(format)) {
1331 String nat = getNativeForFormat(format);
1366 // to a String and recur to reencode according to the requested format.
1380 if (isFlavorCharsetTextType(flavor) && isTextFormat(format)) {
1386 format);
1560 long format, Transferable localeTransferable)
1563 return translateBytesOrStream(null, bytes, flavor, format,
1568 long format, Transferable localeTransferable)
1571 return translateBytesOrStream(str, null, flavor, format,
1578 * an InputStream into an Object, given a source format and a target
1587 DataFlavor flavor, long format,
1599 if (isFileFormat(format)) {
1624 } else if (isURIListFormat(format) && DataFlavor.javaFileListFlavor.equals(flavor)) {
1626 URI uris[] = dragQueryURIs(str, bytes, format, localeTransferable);
1648 isFlavorCharsetTextType(flavor) && isTextFormat(format)) {
1652 format, localeTransferable);
1660 format, localeTransferable));
1667 return translateBytesOrStreamToInputStream(str, flavor, format,
1670 // Target data is a Reader. Obtain data in InputStream format, encoded
1674 if (!(isFlavorCharsetTextType(flavor) && isTextFormat(format))) {
1681 (str, DataFlavor.plainTextFlavor, format,
1691 if (!(isFlavorCharsetTextType(flavor) && isTextFormat(format))) {
1698 format, localeTransferable));
1705 if (!(isFlavorCharsetTextType(flavor) && isTextFormat(format))) {
1712 format, localeTransferable).toCharArray();
1719 if (isFlavorCharsetTextType(flavor) && isTextFormat(format)) {
1722 format, localeTransferable
1740 if (isFlavorCharsetTextType(flavor) && isTextFormat(format)) {
1743 format, localeTransferable
1779 if (!isImageFormat(format)) {
1783 Image image = platformImageBytesOrStreamToImage(str, bytes, format);
1797 (InputStream str, DataFlavor flavor, long format,
1800 if (isFlavorCharsetTextType(flavor) && isTextFormat(format)) {
1802 (str, format, DataTransferer.getTextCharset(flavor),
1884 public ReencodingInputStream(InputStream bytestream, long format,
1889 Long lFormat = Long.valueOf(format);
1892 if (isLocaleDependentTextFormat(format) &&
2053 long format,
2063 * platform-specific image data in the given format into an Image.
2067 long format)
2072 * an image data in the given standard format into an Image.
2127 * specific image data in the given format.
2129 protected abstract byte[] imageToPlatformBytes(Image image, long format)
2134 * an image data in the given standard format.
2297 final long format,
2321 DataFlavor flavor = (DataFlavor)formatMap.get(Long.valueOf(format));
2323 data = translateTransferable(contents, flavor, format);
2363 formatMap.get(Long.valueOf(format));
2365 ret = translateTransferable(contents, flavor, format);
2976 // format.