本文整理匯總了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;
}
示例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;
}
示例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;
}
示例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();
}
示例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;
}
示例6: MediaRenderer
import org.cybergarage.upnp.device.InvalidDescriptionException; //導入依賴的package包/類
public MediaRenderer(String descriptionFileName) throws InvalidDescriptionException {
super(new File(descriptionFileName));
initialize();
}
示例7: MediaServer
import org.cybergarage.upnp.device.InvalidDescriptionException; //導入依賴的package包/類
public MediaServer(String descriptionFileName) throws InvalidDescriptionException {
super(new File(descriptionFileName));
initialize();
}
示例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();
}
示例9: Device
import org.cybergarage.upnp.device.InvalidDescriptionException; //導入依賴的package包/類
public Device(File descriptionFile) throws InvalidDescriptionException
{
this(null, null);
loadDescription(descriptionFile);
}
示例10: Device
import org.cybergarage.upnp.device.InvalidDescriptionException; //導入依賴的package包/類
public Device(File descriptionFile) throws InvalidDescriptionException {
this(null, null);
loadDescription(descriptionFile);
}