Package org.hxzon.asn1.mms.sequence

Examples of org.hxzon.asn1.mms.sequence.ReportSemaphoreEntryStatusRequest$State


                date = date.substring(0, date.length() - 1);
            }
            try {
                return _gFormat.parse(date);
            } catch (ParseException e) {
                throw new AsnEncodingException("Illegal formatted date read from input stream");
            }
        }
    }
View Full Code Here


        }
    }

    public BerNode parseGoose(byte[] data, int offset) {
        ByteArrayInputStream inStream = new ByteArrayInputStream(BytesUtil.copyBytes(data, offset));
        BerInputStream in = new BerInputStream(inStream);
        in.setTagOffset(offset);
        try {
            return super.readPacket(in);
        } catch (IOException e) {
            e.printStackTrace();
            return null;
View Full Code Here

    public static void main(String[] args) throws IOException {
        byte[] data = BytesUtil.fromHexString(smv2);
        String reverse = BytesUtil.toHexString(data);
        System.out.println(reverse);
        ByteArrayInputStream inStream = new ByteArrayInputStream(data);
        BerInputStream in = new BerInputStream(inStream);

        SvPduParser parser = SvPduParser.parser;
        BerNode node;
        while (null != (node = parser.readPacket(in))) {
            System.out.println(Asn1Utils.printBerNode(node));
View Full Code Here

    public static void main(String[] args) throws IOException {
        byte[] data = BytesUtil.fromHexString(mms2);
//        String reverse=BytesUtil.toHexString(data);
//        System.out.println(reverse);
        ByteArrayInputStream inStream = new ByteArrayInputStream(data);
        BerInputStream in = new BerInputStream(inStream);

        BerNode node;
        while (null != (node = OsiPresentationParser.parser.readPacket(in))) {
            System.out.println(Asn1Utils.printBerNode(node));
        }
View Full Code Here

        }
    }

    public BerNode parsePresentation(byte[] data, int offset) {
        ByteArrayInputStream inStream = new ByteArrayInputStream(BytesUtil.copyBytes(data, offset));
        BerInputStream in = new BerInputStream(inStream);
        in.setTagOffset(offset);
        try {
            return super.readPacket(in);
        } catch (IOException e) {
            e.printStackTrace();
            return null;
View Full Code Here

        }
    }

    public BerNode parseSv(byte[] data, int offset) {
        ByteArrayInputStream inStream = new ByteArrayInputStream(BytesUtil.copyBytes(data, offset));
        BerInputStream in = new BerInputStream(inStream);
        in.setTagOffset(offset);
        try {
            return super.readPacket(in);
        } catch (IOException e) {
            e.printStackTrace();
            return null;
View Full Code Here

    public static void main(String[] args) throws IOException {
        byte[] data = BytesUtil.fromHexString(mms1);
        String reverse = BytesUtil.toHexString(data);
        System.out.println(reverse);
        ByteArrayInputStream inStream = new ByteArrayInputStream(data);
        BerInputStream in = new BerInputStream(inStream);

        MmsPduParser parser = new MmsPduParser();
        BerNode node;
        while (null != (node = parser.readPacket(in))) {
            System.out.println(Asn1Utils.printBerNode(node));
View Full Code Here

    public static void main(String[] args) throws IOException {
        byte[] data = BytesUtil.fromHexString(goose2);
//        String reverse=BytesUtil.toHexString(data);
//        System.out.println(reverse);
        ByteArrayInputStream inStream = new ByteArrayInputStream(data);
        BerInputStream in = new BerInputStream(inStream);

        GoosePduParser parser = GoosePduParser.parser;
        BerNode node;
        while (null != (node = parser.readPacket(in))) {
            System.out.println(node.toString());
View Full Code Here

            /*
             * Write as definite length
             */

            ByteArrayOutputStream baos = new ByteArrayOutputStream();
            BerOutputStream tmp = new BerOutputStream(baos, stream.getEncodingMethod());
            it = _fList.iterator();
            while (it.hasNext()) {
                BerNode node = it.next();
                node.writeElement(tmp);
            }
            tmp.close();
            baos.close();

            byte[] data = baos.toByteArray();
            stream.writeBerLength(data.length);
            stream.write(data);
View Full Code Here

    //add by hxzon
    protected void readValue(BerInputStream stream) {
        try {
            int readTag;
            ReadSequence seq = new ReadSequence(this.getName(), stream);
            //add by hxzon:after read len
            super.setOffsetAndLen(stream);
            readTag = seq.readBerTag();
            while (Tag.EOFTYPE != readTag) {
                try {
                    BerNode cnode = create(readTag, stream);
                    logger.trace("create " + cnode.getName() + "," + cnode.getTagDisplay() + ",tag offset:" + cnode.getTagOffset() + ",len:" + cnode.getTotalLen());
                    /** always add choice?
                            //if child is a choice ,and no tag ,and global set don't add choice node
                            if (cnode instanceof BerChoice && !((BerChoice) cnode).hasTag() && Asn1Utils.isNotAddChoiceNode()) {
                              cnode.setParent(this);
                              cnode = ((BerChoice) cnode).getLastRealNode();
                            }
                            **/
                    cnode.setParent(this);
                    _fList.add(cnode);
                } catch (Exception e) {
                    logger.error(this.getClass().getSimpleName() + "[" + this.getName() + "]", e);
                }
                readTag = seq.readBerTag();
            }
//      logger.trace("stream tag offset:"+stream.getTagOffset()+","+super.getDisplayString()+" tag offset:"+super.getTagOffset()
//          +", stream total len:"+stream.getTotalLen());
            super.setTotalLen(stream.getTagOffset() - super.getTagOffset() + stream.getTotalLen());
//      logger.trace("construct:" + super.getDisplayString() + ",tag offset" + super.getTagOffset() + ",total len:" + super.getTotalLen());
View Full Code Here

TOP

Related Classes of org.hxzon.asn1.mms.sequence.ReportSemaphoreEntryStatusRequest$State

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.