javax.activation.DataHandler.getName()方法的使用及代码示例

x33g5p2x  于2022-01-18 转载在 其他  
字(6.1k)|赞(0)|评价(0)|浏览(229)

本文整理了Java中javax.activation.DataHandler.getName()方法的一些代码示例,展示了DataHandler.getName()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。DataHandler.getName()方法的具体详情如下:
包路径:javax.activation.DataHandler
类名称:DataHandler
方法名:getName

DataHandler.getName介绍

[英]Return the name of the data object. If this DataHandler was created with a DataSource, this method calls through to the DataSource.getName method, otherwise it returns null.
[中]返回数据对象的名称。如果此DataHandler是使用数据源创建的,则此方法调用DataSource.getName方法,否则返回null。

代码示例

代码示例来源:origin: spring-projects/spring-framework

private String getHost(String elementNamespace, DataHandler dataHandler) {
  try {
    URI uri = new URI(elementNamespace);
    return uri.getHost();
  }
  catch (URISyntaxException ex) {
    // ignore
  }
  return dataHandler.getName();
}

代码示例来源:origin: javax.activation/activation

/**
   * Returns the name of this object.
   * @return    the name of this object
   */
  public String getName() {
  return dataHandler.getName(); // what else would it be?
  }
}

代码示例来源:origin: spring-projects/spring-framework

@Override
public String addSwaRefAttachment(DataHandler dataHandler) {
  String contentId = UUID.randomUUID() + "@" + dataHandler.getName();
  this.mimeContainer.addAttachment(contentId, dataHandler);
  return contentId;
}

代码示例来源:origin: camunda/camunda-bpm-platform

/**
   * Returns the name of this object.
   * @return    the name of this object
   */
  public String getName() {
  return dataHandler.getName(); // what else would it be?
  }
}

代码示例来源:origin: com.sun.xml.ws/jaxws-rt

/**
   * Returns the name of this object.
   *
   * @return the name of this object
   */
  public String getName() {
    return dataHandler.getName();
  }
}

代码示例来源:origin: org.glassfish.metro/webservices-api

/**
   * Returns the name of this object.
   * @return    the name of this object
   */
  public String getName() {
  return dataHandler.getName(); // what else would it be?
  }
}

代码示例来源:origin: org.springframework.ws/spring-oxm-tiger

private String getHost(String elementNamespace, DataHandler dataHandler) {
  try {
    URI uri = new URI(elementNamespace);
    return uri.getHost();
  }
  catch (URISyntaxException e) {
    // ignore
  }
  return dataHandler.getName();
}

代码示例来源:origin: org.wso2.ei/admin-clients

public void addSchema(String description, DataHandler dh)
    throws ResourceAdminServiceExceptionException, RemoteException {
  String fileName;
  fileName = dh.getName().substring(dh.getName().lastIndexOf('/') + 1);
  resourceAdminServiceStub.addResource("/" + fileName, MEDIA_TYPE_SCHEMA,
                     description, dh, null, null);
}

代码示例来源:origin: org.wso2.ei/admin-clients

public void uploadArtifact(String description, DataHandler dh)
    throws ResourceAdminServiceExceptionException, RemoteException {
  String fileName;
  fileName = dh.getName().substring(dh.getName().lastIndexOf('/') + 1);
  resourceAdminServiceStub.addResource("/" + fileName, MEDIA_TYPE_GOVERNANCE_ARCHIVE,
                     description, dh, null, null);
}

代码示例来源:origin: org.wso2.appserver/org.wso2.appserver.integration.common.clients

public void addPolicy(String description, DataHandler dh)
    throws ResourceAdminServiceExceptionException, RemoteException {
  String fileName;
  fileName = dh.getName().substring(dh.getName().lastIndexOf('/') + 1);
  resourceAdminServiceStub.addResource("/" + fileName, MEDIA_TYPE_POLICY,
                     description, dh, null, null);
}

代码示例来源:origin: org.wso2.es/org.wso2.es.integration.common.clients

public void addPolicy(String description, DataHandler dh)
    throws ResourceAdminServiceExceptionException, RemoteException {
  String fileName;
  fileName = dh.getName().substring(dh.getName().lastIndexOf('/') + 1);
  resourceAdminServiceStub.addResource("/" + fileName, MEDIA_TYPE_POLICY,
                     description, dh, null, null);
}

代码示例来源:origin: org.wso2.esb/admin-clients

public void addPolicy(String description, DataHandler dh)
    throws ResourceAdminServiceExceptionException, RemoteException {
  String fileName;
  fileName = dh.getName().substring(dh.getName().lastIndexOf('/') + 1);
  resourceAdminServiceStub.addResource("/" + fileName, MEDIA_TYPE_POLICY,
                     description, dh, null, null);
}

代码示例来源:origin: org.wso2.esb/admin-clients

public void uploadArtifact(String description, DataHandler dh)
    throws ResourceAdminServiceExceptionException, RemoteException {
  String fileName;
  fileName = dh.getName().substring(dh.getName().lastIndexOf('/') + 1);
  resourceAdminServiceStub.addResource("/" + fileName, MEDIA_TYPE_GOVERNANCE_ARCHIVE,
                     description, dh, null, null);
}

代码示例来源:origin: org.wso2.es/org.wso2.es.integration.common.clients

public void addSchema(String description, DataHandler dh)
    throws ResourceAdminServiceExceptionException, RemoteException {
  String fileName;
  fileName = dh.getName().substring(dh.getName().lastIndexOf('/') + 1);
  resourceAdminServiceStub.addResource("/" + fileName, MEDIA_TYPE_SCHEMA,
                     description, dh, null, null);
}

代码示例来源:origin: org.wso2.dss/org.wso2.dss.integration.common.clients

public void addSchema(String description, DataHandler dh)
    throws ResourceAdminServiceExceptionException, RemoteException {
  String fileName;
  fileName = dh.getName().substring(dh.getName().lastIndexOf('/') + 1);
  resourceAdminServiceStub.addResource("/" + fileName, MEDIA_TYPE_SCHEMA,
                     description, dh, null, null);
}

代码示例来源:origin: org.wso2.ei/admin-clients

public void addWSDL(String description, DataHandler dh)
    throws ResourceAdminServiceExceptionException, RemoteException {
  String fileName;
  fileName = dh.getName().substring(dh.getName().lastIndexOf('/') + 1);
  log.debug(fileName);
  resourceAdminServiceStub.addResource("/" + fileName, MEDIA_TYPE_WSDL, description, dh, null, null);
}

代码示例来源:origin: org.wso2.appserver/org.wso2.appserver.integration.common.clients

public void addWSDL(String description, DataHandler dh)
    throws ResourceAdminServiceExceptionException, RemoteException {
  String fileName;
  fileName = dh.getName().substring(dh.getName().lastIndexOf('/') + 1);
  log.debug(fileName);
  resourceAdminServiceStub.addResource("/" + fileName, MEDIA_TYPE_WSDL, description, dh, null, null);
}

代码示例来源:origin: camunda/camunda-bpm-platform

if (dh.getName() != null)
  return getEncoding(dh.getDataSource());

代码示例来源:origin: com.sun.mail/javax.mail

if (dh.getName() != null)
  return getEncoding(dh.getDataSource());

代码示例来源:origin: org.wso2.appserver/org.wso2.appserver.integration.common.clients

public void uploadModule(DataHandler dh) throws RemoteException {
  ModuleUploadData moduleUploadData = new ModuleUploadData();
  moduleUploadData.setFileName(dh.getName().substring(dh.getName().lastIndexOf('/') + 1));
  moduleUploadData.setDataHandler(dh);
  log.info((moduleAdminServiceStub.uploadModule(new ModuleUploadData[]{moduleUploadData})));
}

相关文章