當前位置: 首頁>>代碼示例>>Java>>正文


Java InvalidDescriptionException類代碼示例

本文整理匯總了Java中org.cybergarage.upnp.device.InvalidDescriptionException的典型用法代碼示例。如果您正苦於以下問題:Java InvalidDescriptionException類的具體用法?Java InvalidDescriptionException怎麽用?Java InvalidDescriptionException使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


InvalidDescriptionException類屬於org.cybergarage.upnp.device包,在下文中一共展示了InvalidDescriptionException類的10個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: loadDescription

import org.cybergarage.upnp.device.InvalidDescriptionException; //導入依賴的package包/類
/**
 * @since 1.8.0
 */
public boolean loadDescription(InputStream input) throws InvalidDescriptionException
{
	try {
		Parser parser = UPnP.getXMLParser();
		rootNode = parser.parse(input);
		if (rootNode == null)
			throw new InvalidDescriptionException(Description.NOROOT_EXCEPTION);
		deviceNode = rootNode.getNode(Device.ELEM_NAME);
		if (deviceNode == null)
			throw new InvalidDescriptionException(Description.NOROOTDEVICE_EXCEPTION);
	}
	catch (ParserException e) {
		throw new InvalidDescriptionException(e);
	}
	
	if (initializeLoadedDescription() == false)
		return false;

	setDescriptionFile(null);
			
	return true;
}
 
開發者ID:NoYouShutup,項目名稱:CryptMeme,代碼行數:26,代碼來源:Device.java

示例2: loadDescription

import org.cybergarage.upnp.device.InvalidDescriptionException; //導入依賴的package包/類
/**
 * @since 1.8.0
 */
public boolean loadDescription(InputStream input)
		throws InvalidDescriptionException {
	try {
		Parser parser = UPnP.getXMLParser();
		rootNode = parser.parse(input);
		if (rootNode == null)
			throw new InvalidDescriptionException(
					Description.NOROOT_EXCEPTION);
		deviceNode = rootNode.getNode(Device.ELEM_NAME);
		if (deviceNode == null)
			throw new InvalidDescriptionException(
					Description.NOROOTDEVICE_EXCEPTION);
	} catch (ParserException e) {
		throw new InvalidDescriptionException(e);
	}

	if (initializeLoadedDescription() == false)
		return false;

	setDescriptionFile(null);

	return true;
}
 
開發者ID:NoYouShutup,項目名稱:CryptMeme,代碼行數:27,代碼來源:Device.java

示例3: loadSCPD

import org.cybergarage.upnp.device.InvalidDescriptionException; //導入依賴的package包/類
public boolean loadSCPD(String scpdStr) throws InvalidDescriptionException
{
	try {
		Parser parser = UPnP.getXMLParser();
		Node scpdNode = parser.parse(scpdStr);
		if (scpdNode == null)
			return false;
		ServiceData data = getServiceData();
		data.setSCPDNode(scpdNode);
	}
	catch (ParserException e) {
		throw new InvalidDescriptionException(e);
	}
	
	return true;
}
 
開發者ID:NoYouShutup,項目名稱:CryptMeme,代碼行數:17,代碼來源:Service.java

示例4: initialize

import org.cybergarage.upnp.device.InvalidDescriptionException; //導入依賴的package包/類
private void initialize(String description, String renderCtrlSCPD, String conMgrSCPD, String avTransSCPD) throws InvalidDescriptionException {
    loadDescription(description);
    getService(RenderingControl.SERVICE_TYPE).loadSCPD(renderCtrlSCPD);
    getService("urn:schemas-upnp-org:service:ConnectionManager:1").loadSCPD(conMgrSCPD);
    getService(AVTransport.SERVICE_TYPE).loadSCPD(avTransSCPD);
    initialize();
}
 
開發者ID:JackChan1999,項目名稱:letv,代碼行數:8,代碼來源:MediaRenderer.java

示例5: loadSCPD

import org.cybergarage.upnp.device.InvalidDescriptionException; //導入依賴的package包/類
public boolean loadSCPD(String scpdStr) throws InvalidDescriptionException
{
	try {
		Parser parser = UPnP.getXMLParser();
		Node scpdNode = parser.parse(scpdStr);
		if (scpdNode == null)
			return false;
		ServiceData data = getServiceData();
		data.setSCPDNode(scpdNode);
	}
	catch (ParserException e) {
		throw new InvalidDescriptionException(e);
	}
	return true;
}
 
開發者ID:NoYouShutup,項目名稱:CryptMeme,代碼行數:16,代碼來源:Service.java

示例6: MediaRenderer

import org.cybergarage.upnp.device.InvalidDescriptionException; //導入依賴的package包/類
public MediaRenderer(String descriptionFileName) throws InvalidDescriptionException {
    super(new File(descriptionFileName));
    initialize();
}
 
開發者ID:JackChan1999,項目名稱:letv,代碼行數:5,代碼來源:MediaRenderer.java

示例7: MediaServer

import org.cybergarage.upnp.device.InvalidDescriptionException; //導入依賴的package包/類
public MediaServer(String descriptionFileName) throws InvalidDescriptionException {
    super(new File(descriptionFileName));
    initialize();
}
 
開發者ID:JackChan1999,項目名稱:letv,代碼行數:5,代碼來源:MediaServer.java

示例8: initialize

import org.cybergarage.upnp.device.InvalidDescriptionException; //導入依賴的package包/類
private void initialize(String description, String contentDirectorySCPD, String connectionManagerSCPD) throws InvalidDescriptionException {
    loadDescription(description);
    getService(ContentDirectory.SERVICE_TYPE).loadSCPD(contentDirectorySCPD);
    getService("urn:schemas-upnp-org:service:ConnectionManager:1").loadSCPD(connectionManagerSCPD);
    initialize();
}
 
開發者ID:JackChan1999,項目名稱:letv,代碼行數:7,代碼來源:MediaServer.java

示例9: Device

import org.cybergarage.upnp.device.InvalidDescriptionException; //導入依賴的package包/類
public Device(File descriptionFile) throws InvalidDescriptionException
{
	this(null, null);
	loadDescription(descriptionFile);
}
 
開發者ID:NoYouShutup,項目名稱:CryptMeme,代碼行數:6,代碼來源:Device.java

示例10: Device

import org.cybergarage.upnp.device.InvalidDescriptionException; //導入依賴的package包/類
public Device(File descriptionFile) throws InvalidDescriptionException {
	this(null, null);
	loadDescription(descriptionFile);
}
 
開發者ID:NoYouShutup,項目名稱:CryptMeme,代碼行數:5,代碼來源:Device.java


注:本文中的org.cybergarage.upnp.device.InvalidDescriptionException類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。