|
Android example source code file (ComprehensionTlv.java)
The ComprehensionTlv.java Android example source code/* * Copyright (C) 2006 The Android Open Source Project * * 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. */ package com.android.internal.telephony.cat; import java.util.ArrayList; import java.util.List; /** * Class for representing COMPREHENSION-TLV objects. * * @see "ETSI TS 101 220 subsection 7.1.1" * * {@hide} */ class ComprehensionTlv { private int mTag; private boolean mCr; private int mLength; private int mValueIndex; private byte[] mRawValue; /** * Constructor. Private on purpose. Use * {@link #decodeMany(byte[], int) decodeMany} or * {@link #decode(byte[], int) decode} method. * * @param tag The tag for this object * @param cr Comprehension Required flag * @param length Length of the value * @param data Byte array containing the value * @param valueIndex Index in data at which the value starts */ protected ComprehensionTlv(int tag, boolean cr, int length, byte[] data, int valueIndex) { mTag = tag; mCr = cr; mLength = length; mValueIndex = valueIndex; mRawValue = data; } public int getTag() { return mTag; } public boolean isComprehensionRequired() { return mCr; } public int getLength() { return mLength; } public int getValueIndex() { return mValueIndex; } public byte[] getRawValue() { return mRawValue; } /** * Parses a list of COMPREHENSION-TLV objects from a byte array. * * @param data A byte array containing data to be parsed * @param startIndex Index in data at which to start parsing * @return A list of COMPREHENSION-TLV objects parsed * @throws ResultException */ public static List<ComprehensionTlv> decodeMany(byte[] data, int startIndex) throws ResultException { ArrayList<ComprehensionTlv> items = new ArrayList Other Android examples (source code examples)Here is a short list of links related to this Android ComprehensionTlv.java source code file: |
... this post is sponsored by my books ... | |
#1 New Release! |
FP Best Seller |
Copyright 1998-2021 Alvin Alexander, alvinalexander.com
All Rights Reserved.
A percentage of advertising revenue from
pages under the /java/jwarehouse
URI on this website is
paid back to open source projects.