本文整理了Java中javax.activation.DataHandler.getTransferDataFlavors()
方法的一些代码示例,展示了DataHandler.getTransferDataFlavors()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。DataHandler.getTransferDataFlavors()
方法的具体详情如下:
包路径:javax.activation.DataHandler
类名称:DataHandler
方法名:getTransferDataFlavors
[英]Return the DataFlavors in which this data is available.
Returns an array of DataFlavor objects indicating the flavors the data can be provided in. The array is usually ordered according to preference for providing the data, from most richly descriptive to least richly descriptive.
The DataHandler attempts to find a DataContentHandler that corresponds to the MIME type of the data. If one is located, the DataHandler calls the DataContentHandler's getTransferDataFlavors
method.
If a DataContentHandler can not be located, and if the DataHandler was created with a DataSource (or URL), one DataFlavor is returned that represents this object's MIME type and the java.io.InputStream
class. If the DataHandler was created with an object and a MIME type, getTransferDataFlavors returns one DataFlavor that represents this object's MIME type and the object's class.
[中]返回此数据可用的DataFlavors。
返回一个DataFlavor对象数组,指示可以在其中提供数据的样式。数组通常根据提供数据的首选项排序,从最富描述性到最不富描述性。
DataHandler尝试查找与数据的MIME类型相对应的DataContentHandler。如果找到一个,DataHandler将调用DataContentHandler的getTransferDataFlavors
方法。
如果找不到DataContentHandler,并且DataHandler是使用数据源(或URL)创建的,则返回一个DataFlavor,表示此对象的MIME类型和java.io.InputStream
类。如果DataHandler是使用对象和MIME类型创建的,则getTransferDataFlavors返回一个DataFlavor,该DataFlavor表示该对象的MIME类型和对象的类。
代码示例来源:origin: javax.activation/activation
/**
* Returns whether the specified data flavor is supported
* for this object.<p>
*
* This method iterates through the DataFlavors returned from
* <code>getTransferDataFlavors</code>, comparing each with
* the specified flavor.
*
* @param flavor the requested flavor for the data
* @return true if the data flavor is supported
* @see javax.activation.DataHandler#getTransferDataFlavors
*/
public boolean isDataFlavorSupported(DataFlavor flavor) {
DataFlavor[] lFlavors = getTransferDataFlavors();
for (int i = 0; i < lFlavors.length; i++) {
if (lFlavors[i].equals(flavor))
return true;
}
return false;
}
代码示例来源:origin: camunda/camunda-bpm-platform
/**
* Returns whether the specified data flavor is supported
* for this object.<p>
*
* This method iterates through the DataFlavors returned from
* <code>getTransferDataFlavors</code>, comparing each with
* the specified flavor.
*
* @param flavor the requested flavor for the data
* @return true if the data flavor is supported
* @see javax.activation.DataHandler#getTransferDataFlavors
*/
public boolean isDataFlavorSupported(DataFlavor flavor) {
DataFlavor[] lFlavors = getTransferDataFlavors();
for (int i = 0; i < lFlavors.length; i++) {
if (lFlavors[i].equals(flavor))
return true;
}
return false;
}
代码示例来源:origin: stackoverflow.com
list.add(f);
for(DataFlavor f:dh.getTransferDataFlavors()) {
list.add(f);
return list.toArray(dh.getTransferDataFlavors());
代码示例来源:origin: org.apache.ws.commons.axiom/axiom-api
public DataFlavor[] getTransferDataFlavors() {
return parent.getTransferDataFlavors();
}
代码示例来源:origin: org.apache.geronimo.specs/geronimo-activation_1.1_spec
public boolean isDataFlavorSupported(DataFlavor flavor) {
DataFlavor[] flavors = getTransferDataFlavors();
for (int i = 0; i < flavors.length; i++) {
DataFlavor dataFlavor = flavors[i];
if (dataFlavor.equals(flavor)) {
return true;
}
}
return false;
}
代码示例来源:origin: org.apache.servicemix.specs/org.apache.servicemix.specs.activation-api-1.1
public boolean isDataFlavorSupported(DataFlavor flavor) {
DataFlavor[] flavors = getTransferDataFlavors();
for (int i = 0; i < flavors.length; i++) {
DataFlavor dataFlavor = flavors[i];
if (dataFlavor.equals(flavor)) {
return true;
}
}
return false;
}
代码示例来源:origin: org.apache.geronimo.specs/geronimo-activation_1.0.2_spec
public boolean isDataFlavorSupported(DataFlavor flavor) {
DataFlavor[] flavors = getTransferDataFlavors();
for (int i = 0; i < flavors.length; i++) {
DataFlavor dataFlavor = flavors[i];
if (dataFlavor.equals(flavor)) {
return true;
}
}
return false;
}
代码示例来源:origin: org.apache.openejb/javaee-api
public boolean isDataFlavorSupported(DataFlavor flavor) {
DataFlavor[] flavors = getTransferDataFlavors();
for (int i = 0; i < flavors.length; i++) {
DataFlavor dataFlavor = flavors[i];
if (dataFlavor.equals(flavor)) {
return true;
}
}
return false;
}
代码示例来源:origin: jakarta.activation/jakarta.activation-api
/**
* Returns whether the specified data flavor is supported
* for this object.<p>
*
* This method iterates through the DataFlavors returned from
* <code>getTransferDataFlavors</code>, comparing each with
* the specified flavor.
*
* @param flavor the requested flavor for the data
* @return true if the data flavor is supported
* @see javax.activation.DataHandler#getTransferDataFlavors
*/
public boolean isDataFlavorSupported(DataFlavor flavor) {
DataFlavor[] lFlavors = getTransferDataFlavors();
for (int i = 0; i < lFlavors.length; i++) {
if (lFlavors[i].equals(flavor))
return true;
}
return false;
}
代码示例来源:origin: javax.activation/javax.activation-api
/**
* Returns whether the specified data flavor is supported
* for this object.<p>
*
* This method iterates through the DataFlavors returned from
* <code>getTransferDataFlavors</code>, comparing each with
* the specified flavor.
*
* @param flavor the requested flavor for the data
* @return true if the data flavor is supported
* @see javax.activation.DataHandler#getTransferDataFlavors
*/
public boolean isDataFlavorSupported(DataFlavor flavor) {
DataFlavor[] lFlavors = getTransferDataFlavors();
for (int i = 0; i < lFlavors.length; i++) {
if (lFlavors[i].equals(flavor))
return true;
}
return false;
}
代码示例来源:origin: com.sun.activation/jakarta.activation
/**
* Returns whether the specified data flavor is supported
* for this object.<p>
*
* This method iterates through the DataFlavors returned from
* <code>getTransferDataFlavors</code>, comparing each with
* the specified flavor.
*
* @param flavor the requested flavor for the data
* @return true if the data flavor is supported
* @see javax.activation.DataHandler#getTransferDataFlavors
*/
public boolean isDataFlavorSupported(DataFlavor flavor) {
DataFlavor[] lFlavors = getTransferDataFlavors();
for (int i = 0; i < lFlavors.length; i++) {
if (lFlavors[i].equals(flavor))
return true;
}
return false;
}
代码示例来源:origin: org.glassfish.metro/webservices-api
/**
* Returns whether the specified data flavor is supported
* for this object.<p>
*
* This method iterates through the DataFlavors returned from
* <code>getTransferDataFlavors</code>, comparing each with
* the specified flavor.
*
* @param flavor the requested flavor for the data
* @return true if the data flavor is supported
* @see javax.activation.DataHandler#getTransferDataFlavors
*/
public boolean isDataFlavorSupported(DataFlavor flavor) {
DataFlavor[] lFlavors = getTransferDataFlavors();
for (int i = 0; i < lFlavors.length; i++) {
if (lFlavors[i].equals(flavor))
return true;
}
return false;
}
代码示例来源:origin: org.jvnet.hudson/activation
/**
* Returns whether the specified data flavor is supported
* for this object.<p>
*
* This method iterates through the DataFlavors returned from
* <code>getTransferDataFlavors</code>, comparing each with
* the specified flavor.
*
* @param flavor the requested flavor for the data
* @return true if the data flavor is supported
* @see javax.activation.DataHandler#getTransferDataFlavors
*/
public boolean isDataFlavorSupported(DataFlavor flavor) {
DataFlavor[] lFlavors = getTransferDataFlavors();
for (int i = 0; i < lFlavors.length; i++) {
if (lFlavors[i].equals(flavor))
return true;
}
return false;
}
代码示例来源:origin: jboss/jboss-javaee-specs
/**
* Returns whether the specified data flavor is supported
* for this object.<p>
*
* This method iterates through the DataFlavors returned from
* <code>getTransferDataFlavors</code>, comparing each with
* the specified flavor.
*
* @param flavor the requested flavor for the data
* @return true if the data flavor is supported
* @see javax.activation.DataHandler#getTransferDataFlavors
*/
public boolean isDataFlavorSupported(DataFlavor flavor) {
DataFlavor[] lFlavors = getTransferDataFlavors();
for (int i = 0; i < lFlavors.length; i++) {
if (lFlavors[i].equals(flavor))
return true;
}
return false;
}
代码示例来源:origin: stackoverflow.com
list.add(f);
for(DataFlavor f:dh.getTransferDataFlavors()) {
list.add(f);
return list.toArray(dh.getTransferDataFlavors());
内容来源于网络,如有侵权,请联系作者删除!