public ServiceReference(String s) { String[] split = s.split("/"); if (split.length == 2) { this.udn = UDN.valueOf(split[0]); this.serviceId = ServiceId.valueOf(split[1]); } else { this.udn = null; this.serviceId = null; } }
public static NamedServiceType valueOf(String s) throws InvalidValueException { String[] strings = s.split("::"); if (strings.length != 2) { throw new InvalidValueException("Can't parse UDN::ServiceType from: " + s); } UDN udn; try { udn = UDN.valueOf(strings[0]); } catch (Exception ex) { throw new InvalidValueException("Can't parse UDN: " + strings[0]); } ServiceType serviceType = ServiceType.valueOf(strings[1]); return new NamedServiceType(udn, serviceType); }
public static NamedDeviceType valueOf(String s) throws InvalidValueException { String[] strings = s.split("::"); if (strings.length != 2) { throw new InvalidValueException("Can't parse UDN::DeviceType from: " + s); } UDN udn; try { udn = UDN.valueOf(strings[0]); } catch (Exception ex) { throw new InvalidValueException("Can't parse UDN: " + strings[0]); } DeviceType deviceType = DeviceType.valueOf(strings[1]); return new NamedDeviceType(udn, deviceType); }
descriptor.serialNumber = XMLUtil.getTextContent(deviceNodeChild); } else if (ELEMENT.UDN.equals(deviceNodeChild)) { descriptor.udn = UDN.valueOf(XMLUtil.getTextContent(deviceNodeChild)); } else if (ELEMENT.iconList.equals(deviceNodeChild)) { hydrateIconList(descriptor, deviceNodeChild);
public ServiceReference(String s) { String[] split = s.split("/"); if (split.length == 2) { this.udn = UDN.valueOf(split[0]); this.serviceId = ServiceId.valueOf(split[1]); } else { this.udn = null; this.serviceId = null; } }
break; case UDN: getInstance().udn = UDN.valueOf(getCharacters()); break; case X_DLNADOC:
public static NamedServiceType valueOf(String s) throws InvalidValueException { String[] strings = s.split("::"); if (strings.length != 2) { throw new InvalidValueException("Can't parse UDN::ServiceType from: " + s); } UDN udn; try { udn = UDN.valueOf(strings[0]); } catch (Exception ex) { throw new InvalidValueException("Can't parse UDN: " + strings[0]); } ServiceType serviceType = ServiceType.valueOf(strings[1]); return new NamedServiceType(udn, serviceType); }
public static NamedDeviceType valueOf(String s) throws InvalidValueException { String[] strings = s.split("::"); if (strings.length != 2) { throw new InvalidValueException("Can't parse UDN::DeviceType from: " + s); } UDN udn; try { udn = UDN.valueOf(strings[0]); } catch (Exception ex) { throw new InvalidValueException("Can't parse UDN: " + strings[0]); } DeviceType deviceType = DeviceType.valueOf(strings[1]); return new NamedDeviceType(udn, deviceType); }
descriptor.serialNumber = XMLUtil.getTextContent(deviceNodeChild); } else if (ELEMENT.UDN.equals(deviceNodeChild)) { descriptor.udn = UDN.valueOf(XMLUtil.getTextContent(deviceNodeChild)); } else if (ELEMENT.iconList.equals(deviceNodeChild)) { hydrateIconList(descriptor, deviceNodeChild);
public ServiceReference(String s) { String[] split = s.split("/"); if (split.length == 2) { this.udn = UDN.valueOf(split[0]); this.serviceId = ServiceId.valueOf(split[1]); } else { this.udn = null; this.serviceId = null; } }
break; case UDN: getInstance().udn = UDN.valueOf(getCharacters()); break; case X_DLNADOC:
public static NamedServiceType valueOf(String s) throws InvalidValueException { String[] strings = s.split("::"); if (strings.length != 2) { throw new InvalidValueException("Can't parse UDN::ServiceType from: " + s); } UDN udn; try { udn = UDN.valueOf(strings[0]); } catch (Exception ex) { throw new InvalidValueException("Can't parse UDN: " + strings[0]); } ServiceType serviceType = ServiceType.valueOf(strings[1]); return new NamedServiceType(udn, serviceType); }
public static NamedDeviceType valueOf(String s) throws InvalidValueException { String[] strings = s.split("::"); if (strings.length != 2) { throw new InvalidValueException("Can't parse UDN::DeviceType from: " + s); } UDN udn; try { udn = UDN.valueOf(strings[0]); } catch (Exception ex) { throw new InvalidValueException("Can't parse UDN: " + strings[0]); } DeviceType deviceType = DeviceType.valueOf(strings[1]); return new NamedDeviceType(udn, deviceType); }
public MediaServer(InetAddress localAddress, Context ctx) throws ValidationException { super(null, port, null, true); Log.i(TAG, "Creating media server !"); localService = new AnnotationLocalServiceBinder() .read(ContentDirectoryService.class); localService.setManager(new DefaultServiceManager<ContentDirectoryService>( localService, ContentDirectoryService.class)); udn = UDN.valueOf(new UUID(0,10).toString()); this.localAddress = localAddress; this.ctx = ctx; createLocalDevice(); ContentDirectoryService contentDirectoryService = (ContentDirectoryService)localService.getManager().getImplementation(); contentDirectoryService.setContext(ctx); contentDirectoryService.setBaseURL(getAddress()); }
descriptor.serialNumber = XMLUtil.getTextContent(deviceNodeChild); } else if (ELEMENT.UDN.equals(deviceNodeChild)) { descriptor.udn = UDN.valueOf(XMLUtil.getTextContent(deviceNodeChild)); } else if (ELEMENT.iconList.equals(deviceNodeChild)) { hydrateIconList(descriptor, deviceNodeChild);
break; case UDN: getInstance().udn = UDN.valueOf(getCharacters()); break; case X_DLNADOC: