jetlinks

CoAP 编解码工具

License

License

GroupId

GroupId

org.jetlinks
ArtifactId

ArtifactId

coap-codec
Last Version

Last Version

1.0.0-RC2
Release Date

Release Date

Type

Type

jar
Description

Description

jetlinks
CoAP 编解码工具
Project URL

Project URL

https://github.com/jetlinks/coap-codec
Source Code Management

Source Code Management

https://github.com/jetlinks/coap-codec

Download coap-codec

How to add to project

<!-- https://jarcasting.com/artifacts/org.jetlinks/coap-codec/ -->
<dependency>
    <groupId>org.jetlinks</groupId>
    <artifactId>coap-codec</artifactId>
    <version>1.0.0-RC2</version>
</dependency>
// https://jarcasting.com/artifacts/org.jetlinks/coap-codec/
implementation 'org.jetlinks:coap-codec:1.0.0-RC2'
// https://jarcasting.com/artifacts/org.jetlinks/coap-codec/
implementation ("org.jetlinks:coap-codec:1.0.0-RC2")
'org.jetlinks:coap-codec:jar:1.0.0-RC2'
<dependency org="org.jetlinks" name="coap-codec" rev="1.0.0-RC2">
  <artifact name="coap-codec" type="jar" />
</dependency>
@Grapes(
@Grab(group='org.jetlinks', module='coap-codec', version='1.0.0-RC2')
)
libraryDependencies += "org.jetlinks" % "coap-codec" % "1.0.0-RC2"
[org.jetlinks/coap-codec "1.0.0-RC2"]

Dependencies

compile (4)

Group / Artifact Type Version
io.netty : netty-buffer jar 4.1.32.Final
javax.annotation : javax.annotation-api jar 1.3.2
com.google.code.findbugs : findbugs jar 3.0.1
org.slf4j : slf4j-api jar

provided (1)

Group / Artifact Type Version
org.projectlombok : lombok jar 1.18.2

test (5)

Group / Artifact Type Version
junit : junit jar
org.mockito : mockito-all jar 1.8.5
com.h2database : h2 jar
com.alibaba : druid jar 1.1.14
ch.qos.logback : logback-classic jar 1.2.3

Project Modules

There are no modules declared in this project.

coap-codec

coap编解码器 Maven Central

//encode
CoapPacket coapPacket = new CoapPacket();
coapPacket.setCode(Code.C205_CONTENT);
coapPacket.setPayload("{}");
coapPacket.headers().setContentFormat(MediaTypes.CT_TEXT_PLAIN);

coapPacket.writeTo(outputStream);


//decode
 CoapPacket packet = CoapPacket.deserialize(inputStream);
 
 packet.headers();
 
 packet.getPayloadString();

org.jetlinks

JetLinks IoT Platform

JetLinks 开源物联网平台社区

Versions

Version
1.0.0-RC2
1.0.0-RC