public abstract class DLNAHeader<T>
extends org.fourthline.cling.model.message.header.UpnpHeader<T>
The newInstance(org.fourthline.cling.support.model.dlna.message.header.DLNAHeader.Type, String)
method
attempts to instantiate the best header subtype for a given header (name) and string value.
Modifier and Type | Class and Description |
---|---|
static class |
DLNAHeader.Type
Maps a standardized DLNA header to potential header subtypes.
|
Constructor and Description |
---|
DLNAHeader() |
Modifier and Type | Method and Description |
---|---|
static DLNAHeader |
newInstance(DLNAHeader.Type type,
String headerValue)
Create a new instance of a
DLNAHeader subtype that matches the given type and value. |
public static DLNAHeader newInstance(DLNAHeader.Type type, String headerValue)
DLNAHeader
subtype that matches the given type and value.
This method iterates through all potential header subtype classes as declared in DLNAHeader.Type
.
It creates a new instance of the subtype class and calls its UpnpHeader.setString(String)
method.
If no InvalidHeaderException
is thrown, the subtype
instance is returned.
type
- The type (or name) of the header.headerValue
- The value of the header.null
if no subtype can be found.Copyright © 2016 4th Line GmbH, Switzerland. All rights reserved.