Package org.apache.yoko.rmi.util

Examples of org.apache.yoko.rmi.util.ByteString


        // debug
        logger.finer("idToClass " + repid);

        if (repid.startsWith("IDL:")) {

            ByteString id = new ByteString(repid);

            try {
                int end = id.lastIndexOf(':');
                ByteString s = end < 0 ? id.substring(4) : id.substring(4, end);

                ByteBuffer bb = new ByteBuffer();

                //
                // reverse order of dot-separated name components up
                // till the first slash.
                //
                int firstSlash = s.indexOf('/');
                if (firstSlash > 0) {
                    ByteString prefix = s.substring(0, firstSlash);
                    ByteString[] elems = prefix.split('.');

                    for (int i = elems.length - 1; i >= 0; i--) {
                        bb.append(fixName(elems[i]));
                        bb.append('.');
                    }
View Full Code Here


        return null;
    }

    static String fixName(String name) {
        return (new ByteString(name)).toString();
    }
View Full Code Here

            buf.append('_');
            buf.append(name);
            return buf.toByteString();
        }

        ByteString result = name;
        ByteString current = name;

        boolean match = true;
        while (match) {

            int len = current.length();
            match = false;

            for (int i = 0; i < reservedPostfixes.length; i++) {
                if (current.endsWith(reservedPostfixes[i])) {
                    ByteBuffer buf = new ByteBuffer();
                    buf.append('_');
                    buf.append(result);
                    result = buf.toByteString();

                    int resultLen = reservedPostfixes[i].length();
                    if (len > resultLen)
                        current = current.substring(0, len - resultLen);
                    else
                        current = new ByteString("");

                    match = true;
                    break;
                }
            }
View Full Code Here

        // debug
        logger.finer("idToClass " + repid);

        if (repid.startsWith("IDL:")) {

            ByteString id = new ByteString(repid);

            try {
                int end = id.lastIndexOf(':');
                ByteString s = end < 0 ? id.substring(4) : id.substring(4, end);

                ByteBuffer bb = new ByteBuffer();

                //
                // reverse order of dot-separated name components up
                // till the first slash.
                //
                int firstSlash = s.indexOf('/');
                if (firstSlash > 0) {
                    ByteString prefix = s.substring(0, firstSlash);
                    ByteString[] elems = prefix.split('.');

                    for (int i = elems.length - 1; i >= 0; i--) {
                        bb.append(fixName(elems[i]));
                        bb.append('.');
                    }
View Full Code Here

        return null;
    }

    static String fixName(String name) {
        return (new ByteString(name)).toString();
    }
View Full Code Here

            buf.append('_');
            buf.append(name);
            return buf.toByteString();
        }

        ByteString result = name;
        ByteString current = name;

        boolean match = true;
        while (match) {

            int len = current.length();
            match = false;

            for (int i = 0; i < reservedPostfixes.length; i++) {
                if (current.endsWith(reservedPostfixes[i])) {
                    ByteBuffer buf = new ByteBuffer();
                    buf.append('_');
                    buf.append(result);
                    result = buf.toByteString();

                    int resultLen = reservedPostfixes[i].length();
                    if (len > resultLen)
                        current = current.substring(0, len - resultLen);
                    else
                        current = new ByteString("");

                    match = true;
                    break;
                }
            }
View Full Code Here

TOP

Related Classes of org.apache.yoko.rmi.util.ByteString

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.