本文整理匯總了Java中javax.ws.rs.core.MediaType.isWildcardType方法的典型用法代碼示例。如果您正苦於以下問題:Java MediaType.isWildcardType方法的具體用法?Java MediaType.isWildcardType怎麽用?Java MediaType.isWildcardType使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類javax.ws.rs.core.MediaType
的用法示例。
在下文中一共展示了MediaType.isWildcardType方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: DicomMultipartResponse
import javax.ws.rs.core.MediaType; //導入方法依賴的package包/類
DicomMultipartResponse(CacheEntry entry,
Request request,
Response response) throws IOException
{
super(entry, request, response);
for (MediaType type : HttpUtil.getAcceptableMediaTypes(request)) {
if (type.isWildcardType()) {
acceptableTransferSyntaxes.add(ExplicitVRLittleEndian);
continue;
}
MediaType relatedType = getMultiPartRelatedType(type);
if (APPLICATION_DICOM_TYPE.isCompatible(relatedType)) {
String tx = getTransferSyntax(relatedType);
if (StringUtils.isNotBlank(tx)) {
if (ImplicitVRLittleEndian.equals(tx)) {
logger.warn("LEI is not permitted by WADO-RS. Ignoring "
+ " type: {}", type);
continue;
}
else if (ExplicitVRBigEndianRetired.equals(tx)) {
logger.warn("BEE is not permitted by WADO-RS. Ignoring "
+ " type: {}", type);
continue;
}
acceptableTransferSyntaxes.add(tx);
}
else {
acceptableTransferSyntaxes.add(ExplicitVRLittleEndian);
}
}
}
if (acceptableTransferSyntaxes.isEmpty()) {
acceptableTransferSyntaxes.add(ExplicitVRLittleEndian);
}
this.out = new MultipartRelatedOutputStream(response.raw().getOutputStream(),
APPLICATION_DICOM);
}