public final long nextSubId() {
            if (offset >= raw.length)
                return -1;
            
            long ret = 0;
            
            char c = (char) (raw[offset] & 0xff);
            if (c == '.')
                throw Errors.newASN1Error(runtime, "Sub identifier cannot start with '.'");
            
            while (offset < raw.length && (c = (char) (raw[offset] & 0xff)) != '.' ) {
                if (c < '0' || c > '9')
                    throw Errors.newASN1Error(runtime, "Invalid character in object identifer: " + c);
                if (ret > ENCODE_LIMIT)
                    throw Errors.newASN1Error(runtime, "Sub object identifier too large");
                if (offset + 1 == Long.MAX_VALUE)
                    throw Errors.newASN1Error(runtime, "Object id value too large");
                
                ret *= 10;
                ret += c - '0';
                offset++;
            }
            
            offset++; /* skip '.' */
            return ret;
        }