org.fourthline.cling.support.model.dlna.message.header
Class DLNAHeader<T>
java.lang.Object
org.fourthline.cling.model.message.header.UpnpHeader<T>
org.fourthline.cling.support.model.dlna.message.header.DLNAHeader<T>
- Direct Known Subclasses:
- AvailableRangeHeader, AvailableSeekRangeHeader, BufferBytesHeader, BufferInfoHeader, ContentFeaturesHeader, EventTypeHeader, FriendlyNameHeader, GetAvailableSeekRangeHeader, GetContentFeaturesHeader, MaxPrateHeader, PeerManagerHeader, PlaySpeedHeader, PragmaHeader, RealTimeInfoHeader, SCIDHeader, ScmsFlagHeader, SupportedHeader, TimeSeekRangeHeader, TransferModeHeader, WCTHeader
public abstract class DLNAHeader<T>
- extends UpnpHeader<T>
Transforms known and standardized DLNA/HTTP headers from/to string representation.
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.
- Author:
- Mario Franco, Christian Bauer
Nested Class Summary |
static class |
DLNAHeader.Type
Maps a standardized DLNA header to potential header subtypes. |
DLNAHeader
public DLNAHeader()
newInstance
public static DLNAHeader newInstance(DLNAHeader.Type type,
String headerValue)
- Create a new instance of a
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.
- Parameters:
type
- The type (or name) of the header.headerValue
- The value of the header.
- Returns:
- The best matching header subtype instance, or
null
if no subtype can be found.
Copyright © 2013 4th Line GmbH, Switzerland. All Rights Reserved.