org.apache.mina.coap.resource

## Class CoapResponse

- java.lang.Object
- - org.apache.mina.coap.resource.CoapResponse

-     public class CoapResponse
      extends Object

  Response to a coap request.
  Author:
    Apache MINA Project

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `CoapResponse(int code, byte[] content, CoapOption... options)` Create the CoAP response for a resource request.

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `int` | `getCode()`
    `byte[]` | `getContent()`
    `CoapOption[]` | `getOptions()`
    `void` | `setCode(int code)`
    `void` | `setContent(byte[] content)`
    `void` | `setOptions(CoapOption[] options)`
    `String` | `toString()`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

- - ### Constructor Detail

    - #### CoapResponse

          public CoapResponse(int code,
                      byte[] content,
                      CoapOption... options)

      Create the CoAP response for a resource request.
      Parameters:
        `code` - the return code for this request see : `CoapCode`
        `content` - the content for this resource request
        `options` - the opetion to send (content-type, cacheability etc..)

  - ### Method Detail

    - #### getCode

          public int getCode()

    - #### setCode

          public void setCode(int code)

    - #### getContent

          public byte[] getContent()

    - #### setContent

          public void setContent(byte[] content)

    - #### getOptions

          public CoapOption[] getOptions()

    - #### setOptions

          public void setOptions(CoapOption[] options)

    - #### toString

          public String toString()

      Overrides:
        `toString` in class `Object`

Copyright © 2009–2013 Apache MINA Project. All rights reserved.