Top Description Methods
org.osgi.service.zigbee

public Interface ZCLFrame

Imports
java.io.DataInput

This interface models the ZigBee Cluster Library Frame.
Author
$Id: c014dffdef6639d1adf255eed4b0a3bf99c41934 $

Method Summary

Modifier and TypeMethod and Description
public byte[]

Returns:

a byte array containing a raw ZCL frame, suitable to be sent on the wire. Any modifications issued on the returned array must not affect the internal representation of the ZCLFrame interface implementation.
getBytes
()

Returns a byte array containing the raw ZCL frame, suitable to be sent on the wire.

public int

Returns:

The actual number of bytes copied.
getBytes
(byte[]
The buffer where to copy the raw ZCL frame.
buffer
)

Copy in the passed array the internal raw ZCLFrame.

public ZigBeeDataInput

Returns:

a DataInput for the payload of the ZCLFrame. This method does not generate a copy of the payload.
getDataInput
()

Returns ZigBeeDataInput for reading the ZCLFrame payload content.

public ZCLHeader

Returns:

the header of this frame.
getHeader
()

Returns the header of this frame.

public int

Returns:

The size of the raw ZCL frame.
getSize
()

Retrieve the current size of the internal raw frame (that is the size of the byte[] that would be returned if calling the getBytes() method.

Method Detail

getBytesback to summary
public byte[] getBytes()

Returns a byte array containing the raw ZCL frame, suitable to be sent on the wire. The returned byte array contains the whole ZCL Frame, including the ZCL Frame Header and the ZCL Frame payload.

Returns:byte[]

a byte array containing a raw ZCL frame, suitable to be sent on the wire. Any modifications issued on the returned array must not affect the internal representation of the ZCLFrame interface implementation.

getBytesback to summary
public int getBytes(byte[] buffer)

Copy in the passed array the internal raw ZCLFrame.

Parameters
buffer:byte[]

The buffer where to copy the raw ZCL frame.

Returns:int

The actual number of bytes copied.

getDataInputback to summary
public ZigBeeDataInput getDataInput()

Returns ZigBeeDataInput for reading the ZCLFrame payload content. Every call to this method returns a different instance. The returned instances must not share the current position to the underlying ZCLFrame payload.

Returns:ZigBeeDataInput

a DataInput for the payload of the ZCLFrame. This method does not generate a copy of the payload.

Exceptions
IllegalStateException:
if the InputStream is not available.
getHeaderback to summary
public ZCLHeader getHeader()

Returns the header of this frame.

Returns:ZCLHeader

the header of this frame.

getSizeback to summary
public int getSize()

Retrieve the current size of the internal raw frame (that is the size of the byte[] that would be returned if calling the getBytes() method.

Returns:int

The size of the raw ZCL frame.