本文整理了Java中javax.activation.DataHandler.getDataContentHandler()
方法的一些代码示例,展示了DataHandler.getDataContentHandler()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。DataHandler.getDataContentHandler()
方法的具体详情如下:
包路径:javax.activation.DataHandler
类名称:DataHandler
方法名:getDataContentHandler
[英]Get the DataContentHandler for this DataHandler:
If a DataContentHandlerFactory is set, use it. Otherwise look for an object to serve DCH in the following order:
if a factory is set, use it
if a CommandMap is set, use it
use the default CommandMap
In any case, wrap the real DataContentHandler with one of our own to handle any missing cases, fill in defaults, and to ensure that we always have a non-null DataContentHandler.
[中]获取此DataHandler的DataContentHandler:
如果设置了DataContentHandlerFactory,请使用它。否则,按以下顺序查找要为DCH服务的对象:
1) 如果设置了工厂,请使用它
2) 如果设置了CommandMap,请使用它
3) 使用默认的CommandMap
在任何情况下,使用我们自己的DataContentHandler包装真实的DataContentHandler,以处理任何缺失的情况,填写默认值,并确保始终具有非空DataContentHandler。
代码示例来源:origin: javax.activation/activation
transferFlavors = getDataContentHandler().getTransferDataFlavors();
return transferFlavors;
代码示例来源:origin: javax.activation/activation
return getDataContentHandler().getTransferData(flavor, dataSource);
代码示例来源:origin: javax.activation/activation
DataContentHandler dch = getDataContentHandler();
dch.writeTo(object, objectMimeType, os);
代码示例来源:origin: javax.activation/activation
/**
* Return the data in its preferred Object form. <p>
*
* If the DataHandler was instantiated with an object, return
* the object. <p>
*
* If the DataHandler was instantiated with a DataSource,
* this method uses a DataContentHandler to return the content
* object for the data represented by this DataHandler. If no
* <code>DataContentHandler</code> can be found for the
* the type of this data, the DataHandler returns an
* InputStream for the data.
*
* @return the content.
* @exception IOException if an IOException occurs during
* this operation.
*/
public Object getContent() throws IOException {
if (object != null)
return object;
else
return getDataContentHandler().getContent(getDataSource());
}
代码示例来源:origin: javax.activation/activation
ins = dataSource.getInputStream();
} else {
DataContentHandler dch = getDataContentHandler();
代码示例来源:origin: camunda/camunda-bpm-platform
transferFlavors = getDataContentHandler().getTransferDataFlavors();
return transferFlavors;
代码示例来源:origin: camunda/camunda-bpm-platform
return getDataContentHandler().getTransferData(flavor, dataSource);
代码示例来源:origin: camunda/camunda-bpm-platform
DataContentHandler dch = getDataContentHandler();
dch.writeTo(object, objectMimeType, os);
代码示例来源:origin: camunda/camunda-bpm-platform
/**
* Return the data in its preferred Object form. <p>
*
* If the DataHandler was instantiated with an object, return
* the object. <p>
*
* If the DataHandler was instantiated with a DataSource,
* this method uses a DataContentHandler to return the content
* object for the data represented by this DataHandler. If no
* <code>DataContentHandler</code> can be found for the
* the type of this data, the DataHandler returns an
* InputStream for the data.
*
* @return the content.
* @exception IOException if an IOException occurs during
* this operation.
*/
public Object getContent() throws IOException {
if (object != null)
return object;
else
return getDataContentHandler().getContent(getDataSource());
}
代码示例来源:origin: camunda/camunda-bpm-platform
ins = dataSource.getInputStream();
} else {
DataContentHandler dch = getDataContentHandler();
代码示例来源:origin: org.apache.geronimo.specs/geronimo-activation_1.0.2_spec
public synchronized DataFlavor[] getTransferDataFlavors() {
return getDataContentHandler().getTransferDataFlavors();
}
代码示例来源:origin: org.apache.geronimo.specs/geronimo-activation_1.1_spec
public synchronized DataFlavor[] getTransferDataFlavors() {
return getDataContentHandler().getTransferDataFlavors();
}
代码示例来源:origin: org.apache.openejb/javaee-api
public synchronized DataFlavor[] getTransferDataFlavors() {
return getDataContentHandler().getTransferDataFlavors();
}
代码示例来源:origin: org.apache.geronimo.specs/geronimo-activation_1.1_spec
public Object getContent() throws IOException {
if (ds instanceof ObjectDataSource) {
return ((ObjectDataSource) ds).data;
} else {
DataContentHandler dch = getDataContentHandler();
if (dch != null) {
return dch.getContent(ds);
} else {
return ds.getInputStream();
}
}
}
代码示例来源:origin: org.apache.openejb/javaee-api
public Object getContent() throws IOException {
if (ds instanceof ObjectDataSource) {
return ((ObjectDataSource) ds).data;
} else {
DataContentHandler dch = getDataContentHandler();
if (dch != null) {
return dch.getContent(ds);
} else {
return ds.getInputStream();
}
}
}
代码示例来源:origin: org.apache.servicemix.specs/org.apache.servicemix.specs.activation-api-1.1
public Object getContent() throws IOException {
if (ds instanceof ObjectDataSource) {
return ((ObjectDataSource) ds).data;
} else {
DataContentHandler dch = getDataContentHandler();
if (dch != null) {
return dch.getContent(ds);
} else {
return ds.getInputStream();
}
}
}
代码示例来源:origin: org.apache.geronimo.specs/geronimo-activation_1.0.2_spec
public Object getContent() throws IOException {
if (ds instanceof ObjectDataSource) {
return ((ObjectDataSource) ds).data;
} else {
DataContentHandler dch = getDataContentHandler();
if (dch != null) {
return dch.getContent(ds);
} else {
return ds.getInputStream();
}
}
}
代码示例来源:origin: org.apache.geronimo.specs/geronimo-activation_1.1_spec
public Object getTransferData(DataFlavor flavor) throws UnsupportedFlavorException, IOException {
DataContentHandler dch = getDataContentHandler();
if (dch != null) {
return dch.getTransferData(flavor, ds);
} else if (this.flavor.match(flavor)) {
if (ds instanceof ObjectDataSource) {
return ((ObjectDataSource) ds).data;
} else {
return ds.getInputStream();
}
} else {
throw new UnsupportedFlavorException(flavor);
}
}
代码示例来源:origin: org.apache.openejb/javaee-api
public Object getTransferData(DataFlavor flavor) throws UnsupportedFlavorException, IOException {
DataContentHandler dch = getDataContentHandler();
if (dch != null) {
return dch.getTransferData(flavor, ds);
} else if (this.flavor.match(flavor)) {
if (ds instanceof ObjectDataSource) {
return ((ObjectDataSource) ds).data;
} else {
return ds.getInputStream();
}
} else {
throw new UnsupportedFlavorException(flavor);
}
}
代码示例来源:origin: org.apache.servicemix.specs/org.apache.servicemix.specs.activation-api-1.1
public Object getTransferData(DataFlavor flavor) throws UnsupportedFlavorException, IOException {
DataContentHandler dch = getDataContentHandler();
if (dch != null) {
return dch.getTransferData(flavor, ds);
} else if (this.flavor.match(flavor)) {
if (ds instanceof ObjectDataSource) {
return ((ObjectDataSource) ds).data;
} else {
return ds.getInputStream();
}
} else {
throw new UnsupportedFlavorException(flavor);
}
}
内容来源于网络,如有侵权,请联系作者删除!