public class Asn1NasDecodeBuffer extends Asn1DecodeBitBuffer
Modifier and Type | Field and Description |
---|---|
static int |
DOWNLINK |
int |
mDirection
3GPP Release Version.
|
int |
mVersion
3GPP Release Version.
|
static int |
UPLINK |
mTraceHandler
mByteCount
context, mTypeCode
Constructor and Description |
---|
Asn1NasDecodeBuffer(byte[] msgdata)
This constructor creates a NAS decode buffer object that
references an encoded message.
|
Asn1NasDecodeBuffer(java.io.InputStream istream)
This constructor creates a NAS decode buffer object that
references an encoded message.
|
Modifier and Type | Method and Description |
---|---|
boolean |
containerHasMoreBits()
Return true if there are more bits to be read in the current
length-constrained container, which is possibly the outer PDU.
|
int |
decodeAltDetmnt(int detmntBits,
int lhmask)
Decode an alternative determinant value in the given number of bits,
translating L/H bits according to the pattern 0x2B and based on the
buffer's bit offset.
|
java.lang.String |
decodeAPN()
Decode an APN string, following TS 24.008 and TS 23.003, and returning
it in dot-notation (a.b.c) format.
|
void |
decodeL3NonImperative(boolean callCtrl)
This function decodes the non-imperative part of an L3 message having
an empty non-imperative part.
|
void |
decodeMCCMNC(Asn1IA5String mcc,
Asn1IA5String mnc)
Decode an MCC-MNC pair.
|
java.lang.String |
decodeMobileIdentityType1(int len,
boolean odd,
byte digit1)
This function is used to decode common data present in different
alternatives within the MobileIdentify CHOICE type.
|
int |
decodeVarAltDetmnt(Asn1NasAltDecodeTabEntry[] table)
Decode a variable length alternative determinant according to the given
table.
|
long |
getContainerRemBits()
Return the number of bits remaining to be read in the current container.
|
boolean |
getPatternBit(byte pattern)
This function picks out the bit from the given pattern that corresponds
to the last bit read from this buffer.
|
boolean |
isInsideContainer()
Return true if a container length is on the container stack.
|
void |
popAllContainers()
Pop all containers from the container stack.
|
void |
popContainer()
Notify the runtime layer of the end of decoding of a length-constrained
container of the given length.
|
void |
pushContainerBits(long bits)
Notify the runtime layer of the start of decoding of a length-constrained
container of a given length.
|
void |
pushContainerBytes(long bytes)
Notify the runtime layer of the start of decoding of a length-constrained
container of a given length.
|
void |
skipToContainerEnd()
Skip all bits, up to and including the last bit of the container from
the top of the container stack.
|
binDump, binDump, byteAlign, decodeBit, decodeBitsToInt, decodeBitsToLong, decodeBitsToOctetArray, decodeBitsToOctetArray, getAvailableBits, getBitOffset, getBitOffsetInByte, getMsgBitCnt, getTraceHandler, hasMoreBits, mark, moveBitCursor, readByte, reset, setInputStream, skipBits
addCaptureBuffer, capture, decodeIntValue, decodeOIDContents, decodeOIDContentsBig, decodeRelOIDContents, decodeRelOIDContentsBig, getByteCount, getInputStream, getLazyOpenTypeDecode, hexDump, init, read, read, read, read2Bytes, read4Bytes, removeCaptureBuffer, setLazyOpenTypeDecode, skip, skipOIDContents, skipRelOIDContents
addNamedEventHandler, getEventHandlerListCount, hasEventHandlers, invokeCharacters, invokeEndElement, invokeStartElement, setEventHandlerList
getContext, hexDump, hexDump, setKey, setTypeCode
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getInputStream
public int mVersion
public static final int DOWNLINK
public static final int UPLINK
public int mDirection
public Asn1NasDecodeBuffer(byte[] msgdata)
msgdata
- Byte array containing an encoded message.public Asn1NasDecodeBuffer(java.io.InputStream istream)
istream
- Input stream containing an encoded message.public final boolean containerHasMoreBits()
public final int decodeAltDetmnt(int detmntBits, int lhmask) throws java.io.IOException
detmntBits
- The number of bits to decode.lhmask
- A mask which indicates whether each bit in detmnt is a
0/1 bit or an L/H bit. L/H bits are represented in
detmnt using 0/1, respectively. This is left-aligned so
that the highest bit in the mask applies to the first
bit to be decoded.java.io.IOException
public java.lang.String decodeAPN() throws java.io.IOException
java.io.IOException
public void decodeMCCMNC(Asn1IA5String mcc, Asn1IA5String mnc) throws java.io.IOException
mcc
- Receives the MCCmnc
- Receives the MNCjava.io.IOException
public int decodeVarAltDetmnt(Asn1NasAltDecodeTabEntry[] table) throws java.io.IOException
table
- Controls decoding. See Asn1NasAltDecodeTabEntry.java.io.IOException
public void decodeL3NonImperative(boolean callCtrl) throws Asn1UnknownIEI, java.io.IOException
callCtrl
- Boolean indicating this is a call control message.Asn1UnknownIEI
- if an unknown comprehension required IE is found.java.io.IOException
public final java.lang.String decodeMobileIdentityType1(int len, boolean odd, byte digit1) throws java.io.IOException
len
- Length in bytes of the data to be decoded. This
includes 1 byte for the header.odd
- Odd/even indicator boolean decoded from header.digit1
- First BCD character decoded from header.java.io.IOException
public final boolean getPatternBit(byte pattern)
public final long getContainerRemBits()
public final boolean isInsideContainer()
public final void pushContainerBytes(long bytes)
bytes
- Number of bytes of the length-constrained container.public final void pushContainerBits(long bits)
bits
- Number of bits in the length-constrained container.public final void popContainer()
public final void popAllContainers()
public final void skipToContainerEnd() throws java.io.IOException, Asn1EndOfBufferException
java.io.IOException
Asn1EndOfBufferException