Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Unpublished - rights reserved under the Copyright Laws of the United States. Copyright � 2003 Sun Microsystems, Inc. All rights reserved. Copyright � 2005 BEA Systems, Inc. All rights reserved. Use is subject to license terms. This distribution may include materials developed by third parties. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Module Name : JSIP Specification File Name : Author : Phelim O'Doherty HISTORY Version Date Author Comments 1.1 08/10/2002 Phelim O'Doherty ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 package javax.sip.header;
The Accept-Language header field is used in requests to indicate the preferred languages for reason phrases, session descriptions, or status responses carried as message bodies in the response. If no Accept-Language header field is present, the server SHOULD assume all languages are acceptable to the client. The q-value is used in a similar manner to AcceptHeader to indicate degrees of preference.

For Example:
Accept-Language: da, en-gb;q=0.8, en;q=0.7

BEA Systems, NIST
See also:
 public interface AcceptLanguageHeader extends ParametersHeader{

Gets q-value of the media-range in AcceptLanguageHeader. A value of -1 indicates theq-value is not set.

q-value of media-range, -1 if q-value is not set.
     public float getQValue();

Sets q-value for media-range in AcceptLanguageHeader. Q-values allow the user to indicate the relative degree of preference for that media-range, using the qvalue scale from 0 to 1. If no q-value is present, the media-range should be treated as having a q-value of 1.

qValue - the new float value of the q-value, a value of -1 resets the qValue.
javax.sip.InvalidArgumentException if the q parameter value is not -1 or between 0 and 1.
    public void setQValue(float qValuethrows InvalidArgumentException;

Gets the language value of the AcceptLanguageHeader.

the language Locale value of this AcceptLanguageHeader
    public Locale getAcceptLanguage();

Sets the language parameter of this AcceptLanguageHeader.

language - the new Locale value of the language of AcceptLanguageHeader
    public void setAcceptLanguage(Locale language);

Name of AcceptLanguageHeader
    public final static String NAME = "Accept-Language";
New to GrepCode? Check out our FAQ X