⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 netdfs.java

📁 实现网上邻居需要的jar库;可以使用库中的接口实现文件共享的功能
💻 JAVA
📖 第 1 页 / 共 2 页
字号:
                        s[_i] = new DfsInfo3();
                    }
                    s[_i].decode(_src);
                }
            }
        }
    }
    public static class DfsInfo200 extends NdrObject {

        public String dfs_name;

        public void encode(NdrBuffer _dst) throws NdrException {
            _dst.align(4);
            _dst.enc_ndr_referent(dfs_name, 1);

            if (dfs_name != null) {
                _dst = _dst.deferred;
                _dst.enc_ndr_string(dfs_name);

            }
        }
        public void decode(NdrBuffer _src) throws NdrException {
            _src.align(4);
            int _dfs_namep = _src.dec_ndr_long();

            if (_dfs_namep != 0) {
                _src = _src.deferred;
                dfs_name = _src.dec_ndr_string();

            }
        }
    }
    public static class DfsEnumArray200 extends NdrObject {

        public int count;
        public DfsInfo200[] s;

        public void encode(NdrBuffer _dst) throws NdrException {
            _dst.align(4);
            _dst.enc_ndr_long(count);
            _dst.enc_ndr_referent(s, 1);

            if (s != null) {
                _dst = _dst.deferred;
                int _ss = count;
                _dst.enc_ndr_long(_ss);
                int _si = _dst.index;
                _dst.advance(4 * _ss);

                _dst = _dst.derive(_si);
                for (int _i = 0; _i < _ss; _i++) {
                    s[_i].encode(_dst);
                }
            }
        }
        public void decode(NdrBuffer _src) throws NdrException {
            _src.align(4);
            count = (int)_src.dec_ndr_long();
            int _sp = _src.dec_ndr_long();

            if (_sp != 0) {
                _src = _src.deferred;
                int _ss = _src.dec_ndr_long();
                int _si = _src.index;
                _src.advance(4 * _ss);

                if (s == null) {
                    if (_ss < 0 || _ss > 0xFFFF) throw new NdrException( NdrException.INVALID_CONFORMANCE );
                    s = new DfsInfo200[_ss];
                }
                _src = _src.derive(_si);
                for (int _i = 0; _i < _ss; _i++) {
                    if (s[_i] == null) {
                        s[_i] = new DfsInfo200();
                    }
                    s[_i].decode(_src);
                }
            }
        }
    }
    public static class DfsInfo300 extends NdrObject {

        public int flags;
        public String dfs_name;

        public void encode(NdrBuffer _dst) throws NdrException {
            _dst.align(4);
            _dst.enc_ndr_long(flags);
            _dst.enc_ndr_referent(dfs_name, 1);

            if (dfs_name != null) {
                _dst = _dst.deferred;
                _dst.enc_ndr_string(dfs_name);

            }
        }
        public void decode(NdrBuffer _src) throws NdrException {
            _src.align(4);
            flags = (int)_src.dec_ndr_long();
            int _dfs_namep = _src.dec_ndr_long();

            if (_dfs_namep != 0) {
                _src = _src.deferred;
                dfs_name = _src.dec_ndr_string();

            }
        }
    }
    public static class DfsEnumArray300 extends NdrObject {

        public int count;
        public DfsInfo300[] s;

        public void encode(NdrBuffer _dst) throws NdrException {
            _dst.align(4);
            _dst.enc_ndr_long(count);
            _dst.enc_ndr_referent(s, 1);

            if (s != null) {
                _dst = _dst.deferred;
                int _ss = count;
                _dst.enc_ndr_long(_ss);
                int _si = _dst.index;
                _dst.advance(8 * _ss);

                _dst = _dst.derive(_si);
                for (int _i = 0; _i < _ss; _i++) {
                    s[_i].encode(_dst);
                }
            }
        }
        public void decode(NdrBuffer _src) throws NdrException {
            _src.align(4);
            count = (int)_src.dec_ndr_long();
            int _sp = _src.dec_ndr_long();

            if (_sp != 0) {
                _src = _src.deferred;
                int _ss = _src.dec_ndr_long();
                int _si = _src.index;
                _src.advance(8 * _ss);

                if (s == null) {
                    if (_ss < 0 || _ss > 0xFFFF) throw new NdrException( NdrException.INVALID_CONFORMANCE );
                    s = new DfsInfo300[_ss];
                }
                _src = _src.derive(_si);
                for (int _i = 0; _i < _ss; _i++) {
                    if (s[_i] == null) {
                        s[_i] = new DfsInfo300();
                    }
                    s[_i].decode(_src);
                }
            }
        }
    }
    public static class DfsEnumStruct extends NdrObject {

        public int level;
        public NdrObject e;

        public void encode(NdrBuffer _dst) throws NdrException {
            _dst.align(4);
            _dst.enc_ndr_long(level);
            int _descr = level;
            _dst.enc_ndr_long(_descr);
            _dst.enc_ndr_referent(e, 1);

            if (e != null) {
                _dst = _dst.deferred;
                e.encode(_dst);

            }
        }
        public void decode(NdrBuffer _src) throws NdrException {
            _src.align(4);
            level = (int)_src.dec_ndr_long();
            _src.dec_ndr_long(); /* union discriminant */
            int _ep = _src.dec_ndr_long();

            if (_ep != 0) {
                if (e == null) { /* YOYOYO */
                    e = new DfsEnumArray1();
                }
                _src = _src.deferred;
                e.decode(_src);

            }
        }
    }
    public static class NetrDfsEnumEx extends DcerpcMessage {

        public int getOpnum() { return 0x15; }

        public int retval;
        public String dfs_name;
        public int level;
        public int prefmaxlen;
        public DfsEnumStruct info;
        public NdrLong totalentries;

        public NetrDfsEnumEx(String dfs_name,
                    int level,
                    int prefmaxlen,
                    DfsEnumStruct info,
                    NdrLong totalentries) {
            this.dfs_name = dfs_name;
            this.level = level;
            this.prefmaxlen = prefmaxlen;
            this.info = info;
            this.totalentries = totalentries;
        }

        public void encode_in(NdrBuffer _dst) throws NdrException {
            _dst.enc_ndr_string(dfs_name);
            _dst.enc_ndr_long(level);
            _dst.enc_ndr_long(prefmaxlen);
            _dst.enc_ndr_referent(info, 1);
            if (info != null) {
                info.encode(_dst);

            }
            _dst.enc_ndr_referent(totalentries, 1);
            if (totalentries != null) {
                totalentries.encode(_dst);

            }
        }
        public void decode_out(NdrBuffer _src) throws NdrException {
            int _infop = _src.dec_ndr_long();
            if (_infop != 0) {
                if (info == null) { /* YOYOYO */
                    info = new DfsEnumStruct();
                }
                info.decode(_src);

            }
            int _totalentriesp = _src.dec_ndr_long();
            if (_totalentriesp != 0) {
                totalentries.decode(_src);

            }
            retval = (int)_src.dec_ndr_long();
        }
    }
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -