tag | 3a52e04b686ee6c2278b2acaf07425a98337c97d | |
---|---|---|
tagger | The Android Open Source Project <initial-contribution@android.com> | Wed Apr 24 20:10:54 2024 -0700 |
object | d577d88e25ed71015bc358ae042b74fd096cbea0 |
aml_wif_341610000 (11391728,com.google.android.wifi)
commit | d577d88e25ed71015bc358ae042b74fd096cbea0 | [log] [tgz] |
---|---|---|
author | Android Build Coastguard Worker <android-build-coastguard-worker@google.com> | Fri Jul 07 00:58:27 2023 +0000 |
committer | Android Build Coastguard Worker <android-build-coastguard-worker@google.com> | Fri Jul 07 00:58:27 2023 +0000 |
tree | 77ec2740277e4361522175b4f04e0a1d118c0e74 | |
parent | 4faafd85bf97a3b9b80051b3b290eec0bf45a711 [diff] | |
parent | 0839b8ae77ee20f5a664b43f888ff0a2f88246c4 [diff] |
Snap for 10447354 from 0839b8ae77ee20f5a664b43f888ff0a2f88246c4 to mainline-wifi-release Change-Id: I865b3fa0694b888dd174e3fd7fcebb82b3b337b8
A Java 7 implementation of RFC 7049: Concise Binary Object Representation (CBOR)
Add this to the dependencies section of your pom.xml file:
<dependency> <groupId>co.nstant.in</groupId> <artifactId>cbor</artifactId> <version>0.8</version> </dependency>
ByteArrayOutputStream baos = new ByteArrayOutputStream(); new CborEncoder(baos).encode(new CborBuilder() .add("text") // add string .add(1234) // add integer .add(new byte[] { 0x10 }) // add byte array .addArray() // add array .add(1) .add("text") .end() .build()); byte[] encodedBytes = baos.toByteArray();
ByteArrayInputStream bais = new ByteArrayInputStream(encodedBytes); List<DataItem> dataItems = new CborDecoder(bais).decode(); for(DataItem dataItem : dataItems) { // process data item }
ByteArrayInputStream bais = new ByteArrayInputStream(encodedBytes); new CborDecoder(bais).decode(new DataItemListener() { @Override public void onDataItem(DataItem dataItem) { // process data item } });
This project uses the C4 process for all code changes.
Copyright 2013-2017 Constantin Rack Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.