org.teleal.cling.model.message
Class UpnpHeaders

java.lang.Object
  extended by org.teleal.common.http.Headers
      extended by org.teleal.cling.model.message.UpnpHeaders
All Implemented Interfaces:
Map<String,List<String>>

public class UpnpHeaders
extends org.teleal.common.http.Headers

Provides UPnP header API in addition to plain multi-map HTTP header access.

Author:
Christian Bauer

Nested Class Summary
 
Nested classes/interfaces inherited from interface java.util.Map
Map.Entry<K,V>
 
Field Summary
protected  Map<UpnpHeader.Type,List<UpnpHeader>> parsedHeaders
           
 
Constructor Summary
UpnpHeaders()
           
UpnpHeaders(ByteArrayInputStream inputStream)
           
UpnpHeaders(Map<String,List<String>> headers)
           
 
Method Summary
 void add(String key, String value)
           
 void add(UpnpHeader.Type type, UpnpHeader value)
           
protected  void addParsedValue(UpnpHeader.Type type, UpnpHeader value)
           
 void clear()
           
 boolean containsKey(UpnpHeader.Type type)
           
 List<UpnpHeader> get(UpnpHeader.Type type)
           
 UpnpHeader[] getAsArray(UpnpHeader.Type type)
           
 UpnpHeader getFirstHeader(UpnpHeader.Type type)
           
<H extends UpnpHeader>
H
getFirstHeader(UpnpHeader.Type type, Class<H> subtype)
           
 void log()
           
protected  void parseHeaders()
           
 List<String> put(String key, List<String> values)
           
 List<String> remove(Object key)
           
 void remove(UpnpHeader.Type type)
           
 
Methods inherited from class org.teleal.common.http.Headers
containsKey, containsValue, entrySet, equals, findEndOfString, findNonWhitespace, get, getFirstHeader, hashCode, isEmpty, keySet, putAll, readLine, set, size, splitHeader, toString, values
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

parsedHeaders

protected Map<UpnpHeader.Type,List<UpnpHeader>> parsedHeaders
Constructor Detail

UpnpHeaders

public UpnpHeaders()

UpnpHeaders

public UpnpHeaders(Map<String,List<String>> headers)

UpnpHeaders

public UpnpHeaders(ByteArrayInputStream inputStream)
Method Detail

parseHeaders

protected void parseHeaders()

addParsedValue

protected void addParsedValue(UpnpHeader.Type type,
                              UpnpHeader value)

put

public List<String> put(String key,
                        List<String> values)
Specified by:
put in interface Map<String,List<String>>
Overrides:
put in class org.teleal.common.http.Headers

add

public void add(String key,
                String value)
Overrides:
add in class org.teleal.common.http.Headers

remove

public List<String> remove(Object key)
Specified by:
remove in interface Map<String,List<String>>
Overrides:
remove in class org.teleal.common.http.Headers

clear

public void clear()
Specified by:
clear in interface Map<String,List<String>>
Overrides:
clear in class org.teleal.common.http.Headers

containsKey

public boolean containsKey(UpnpHeader.Type type)

get

public List<UpnpHeader> get(UpnpHeader.Type type)

add

public void add(UpnpHeader.Type type,
                UpnpHeader value)

remove

public void remove(UpnpHeader.Type type)

getAsArray

public UpnpHeader[] getAsArray(UpnpHeader.Type type)

getFirstHeader

public UpnpHeader getFirstHeader(UpnpHeader.Type type)

getFirstHeader

public <H extends UpnpHeader> H getFirstHeader(UpnpHeader.Type type,
                                               Class<H> subtype)

log

public void log()


Copyright © 2011 Teleal GmbH, Switzerland. All Rights Reserved.