IT. Expert System.

Android Reference

HeaderSet


javax.obex

Class HeaderSet



  • public final class HeaderSet
    extends Object
    This class implements the javax.obex.HeaderSet interface for OBEX over RFCOMM.
    • Field Summary

      Fields
      Modifier and Type Field and Description
      static int APPLICATION_PARAMETER
      Represents the OBEX Application Parameter header.
      static int AUTH_CHALLENGE
      Represents the OBEX authentication digest-challenge.
      static int AUTH_RESPONSE
      Represents the OBEX authentication digest-response.
      static int BODY
      Represents the OBEX BODY header.
      static int CONNECTION_ID
      Represents the OBEX Connection ID header.
      static int COUNT
      Represents the OBEX Count header.
      static int DESCRIPTION
      Represents the OBEX Description header.
      static int END_OF_BODY
      Represents the OBEX End of BODY header.
      static int HTTP
      Represents the OBEX HTTP header.
      static int LENGTH
      Represents the OBEX Length header.
      byte[] mAuthChall
      byte[] mAuthResp
      byte[] mConnectionID
      static int NAME
      Represents the OBEX Name header.
      static int OBJECT_CLASS
      Represents the OBEX Object Class header.
      int responseCode
      static int TARGET
      Represents the OBEX Target header.
      static int TIME_4_BYTE
      Represents the OBEX Time header using the 4 byte representation.
      static int TIME_ISO_8601
      Represents the OBEX Time header using the ISO 8601 standards.
      static int TYPE
      Represents the OBEX Type header.
      static int WHO
      Represents the OBEX Who header.
    • Constructor Summary

      Constructors
      Constructor and Description
      HeaderSet()
      Creates new HeaderSet object.
    • Field Detail

      • COUNT

        public static final int COUNT
        Represents the OBEX Count header. This allows the connection statement to tell the server how many objects it plans to send or retrieve.

        The value of COUNT is 0xC0 (192).

        See Also:
        Constant Field Values
      • NAME

        public static final int NAME
        Represents the OBEX Name header. This specifies the name of the object.

        The value of NAME is 0x01 (1).

        See Also:
        Constant Field Values
      • TYPE

        public static final int TYPE
        Represents the OBEX Type header. This allows a request to specify the type of the object (e.g. text, html, binary, etc.).

        The value of TYPE is 0x42 (66).

        See Also:
        Constant Field Values
      • LENGTH

        public static final int LENGTH
        Represents the OBEX Length header. This is the length of the object in bytes.

        The value of LENGTH is 0xC3 (195).

        See Also:
        Constant Field Values
      • TIME_ISO_8601

        public static final int TIME_ISO_8601
        Represents the OBEX Time header using the ISO 8601 standards. This is the preferred time header.

        The value of TIME_ISO_8601 is 0x44 (68).

        See Also:
        Constant Field Values
      • TIME_4_BYTE

        public static final int TIME_4_BYTE
        Represents the OBEX Time header using the 4 byte representation. This is only included for backwards compatibility. It represents the number of seconds since January 1, 1970.

        The value of TIME_4_BYTE is 0xC4 (196).

        See Also:
        Constant Field Values
      • DESCRIPTION

        public static final int DESCRIPTION
        Represents the OBEX Description header. This is a text description of the object.

        The value of DESCRIPTION is 0x05 (5).

        See Also:
        Constant Field Values
      • TARGET

        public static final int TARGET
        Represents the OBEX Target header. This is the name of the service an operation is targeted to.

        The value of TARGET is 0x46 (70).

        See Also:
        Constant Field Values
      • HTTP

        public static final int HTTP
        Represents the OBEX HTTP header. This allows an HTTP 1.X header to be included in a request or reply.

        The value of HTTP is 0x47 (71).

        See Also:
        Constant Field Values
      • BODY

        public static final int BODY
        Represents the OBEX BODY header.

        The value of BODY is 0x48 (72).

        See Also:
        Constant Field Values
      • END_OF_BODY

        public static final int END_OF_BODY
        Represents the OBEX End of BODY header.

        The value of BODY is 0x49 (73).

        See Also:
        Constant Field Values
      • WHO

        public static final int WHO
        Represents the OBEX Who header. Identifies the OBEX application to determine if the two peers are talking to each other.

        The value of WHO is 0x4A (74).

        See Also:
        Constant Field Values
      • CONNECTION_ID

        public static final int CONNECTION_ID
        Represents the OBEX Connection ID header. Identifies used for OBEX connection multiplexing.

        The value of CONNECTION_ID is 0xCB (203).

        See Also:
        Constant Field Values
      • APPLICATION_PARAMETER

        public static final int APPLICATION_PARAMETER
        Represents the OBEX Application Parameter header. This header specifies additional application request and response information.

        The value of APPLICATION_PARAMETER is 0x4C (76).

        See Also:
        Constant Field Values
      • AUTH_CHALLENGE

        public static final int AUTH_CHALLENGE
        Represents the OBEX authentication digest-challenge.

        The value of AUTH_CHALLENGE is 0x4D (77).

        See Also:
        Constant Field Values
      • AUTH_RESPONSE

        public static final int AUTH_RESPONSE
        Represents the OBEX authentication digest-response.

        The value of AUTH_RESPONSE is 0x4E (78).

        See Also:
        Constant Field Values
      • OBJECT_CLASS

        public static final int OBJECT_CLASS
        Represents the OBEX Object Class header. This header specifies the OBEX object class of the object.

        The value of OBJECT_CLASS is 0x4F (79).

        See Also:
        Constant Field Values
      • mAuthChall

        public byte[] mAuthChall
      • mAuthResp

        public byte[] mAuthResp
      • mConnectionID

        public byte[] mConnectionID
      • responseCode

        public int responseCode
    • Constructor Detail

      • HeaderSet

        public HeaderSet()
        Creates new HeaderSet object.
        Parameters:
        size - the max packet size for this connection
    • Method Detail

      • setHeader

        public void setHeader(int headerID,
                     Object headerValue)
        Sets the value of the header identifier to the value provided. The type of object must correspond to the Java type defined in the description of this interface. If null is passed as the headerValue then the header will be removed from the set of headers to include in the next request.
        Parameters:
        headerID - the identifier to include in the message
        headerValue - the value of the header identifier
        Throws:
        IllegalArgumentException - if the header identifier provided is not one defined in this interface or a user-defined header; if the type of headerValue is not the correct Java type as defined in the description of this interface\
      • getHeader

        public Object getHeader(int headerID)
                         throws IOException
        Retrieves the value of the header identifier provided. The type of the Object returned is defined in the description of this interface.
        Parameters:
        headerID - the header identifier whose value is to be returned
        Returns:
        the value of the header provided or null if the header identifier specified is not part of this HeaderSet object
        Throws:
        IllegalArgumentException - if the headerID is not one defined in this interface or any of the user-defined headers
        IOException - if an error occurred in the transport layer during the operation or if the connection has been closed
      • getHeaderList

        public int[] getHeaderList()
                            throws IOException
        Retrieves the list of headers that may be retrieved via the getHeader method that will not return null. In other words, this method returns all the headers that are available in this object.
        Returns:
        the array of headers that are set in this object or null if no headers are available
        Throws:
        IOException - if an error occurred in the transport layer during the operation or the connection has been closed
        See Also:
        getHeader(int)
      • createAuthenticationChallenge

        public void createAuthenticationChallenge(String realm,
                                         boolean userID,
                                         boolean access)
                                           throws IOException
        Sets the authentication challenge header. The realm will be encoded based upon the default encoding scheme used by the implementation to encode strings. Therefore, the encoding scheme used to encode the realm is application dependent.
        Parameters:
        realm - a short description that describes what password to use; if null no realm will be sent in the authentication challenge header
        userID - if true, a user ID is required in the reply; if false, no user ID is required
        access - if true then full access will be granted if successful; if false then read-only access will be granted if successful
        Throws:
        IOException
      • getResponseCode

        public int getResponseCode()
                            throws IOException
        Returns the response code received from the server. Response codes are defined in the ResponseCodes class.
        Returns:
        the response code retrieved from the server
        Throws:
        IOException - if an error occurred in the transport layer during the transaction; if this method is called on a HeaderSet object created by calling createHeaderSet() in a ClientSession object; if this object was created by an OBEX server
        See Also:
        ResponseCodes


Content

Android Reference

Java basics

Java Enterprise Edition (EE)

Java Standard Edition (SE)

SQL

HTML

PHP

CSS

Java Script

MYSQL

JQUERY

VBS

REGEX

C

C++

C#

Design patterns

RFC (standard status)

RFC (proposed standard status)

RFC (draft standard status)

RFC (informational status)

RFC (experimental status)

RFC (best current practice status)

RFC (historic status)

RFC (unknown status)

IT dictionary

License.
All information of this service is derived from the free sources and is provided solely in the form of quotations. This service provides information and interfaces solely for the familiarization (not ownership) and under the "as is" condition.
Copyright 2016 © ELTASK.COM. All rights reserved.
Site is optimized for mobile devices.
Downloads: 181 / 158668868. Delta: 0.00820 с