serializationprocedure.java

来自「垃圾邮件过滤器源代码」· Java 代码 · 共 714 行 · 第 1/2 页

JAVA
714
字号
        }        return true;    }    public boolean execute(long key, int val) {        try {            stream.writeLong(key);            stream.writeInt(val);        } catch (IOException e) {            this.exception = e;            return false;        }        return true;    }    public boolean execute(long key, long val) {        try {            stream.writeLong(key);            stream.writeLong(val);        } catch (IOException e) {            this.exception = e;            return false;        }        return true;    }    public boolean execute(long key, double val) {        try {            stream.writeLong(key);            stream.writeDouble(val);        } catch (IOException e) {            this.exception = e;            return false;        }        return true;    }    public boolean execute(long key, float val) {        try {            stream.writeLong(key);            stream.writeFloat(val);        } catch (IOException e) {            this.exception = e;            return false;        }        return true;    }    public boolean execute(double key, Object val) {        try {            stream.writeDouble(key);            stream.writeObject(val);        } catch (IOException e) {            this.exception = e;            return false;        }        return true;    }    public boolean execute(double key, byte val) {        try {            stream.writeDouble(key);            stream.writeByte(val);        } catch (IOException e) {            this.exception = e;            return false;        }        return true;    }    public boolean execute(double key, short val) {        try {            stream.writeDouble(key);            stream.writeShort(val);        } catch (IOException e) {            this.exception = e;            return false;        }        return true;    }    public boolean execute(double key, int val) {        try {            stream.writeDouble(key);            stream.writeInt(val);        } catch (IOException e) {            this.exception = e;            return false;        }        return true;    }    public boolean execute(double key, long val) {        try {            stream.writeDouble(key);            stream.writeLong(val);        } catch (IOException e) {            this.exception = e;            return false;        }        return true;    }    public boolean execute(double key, double val) {        try {            stream.writeDouble(key);            stream.writeDouble(val);        } catch (IOException e) {            this.exception = e;            return false;        }        return true;    }    public boolean execute(double key, float val) {        try {            stream.writeDouble(key);            stream.writeFloat(val);        } catch (IOException e) {            this.exception = e;            return false;        }        return true;    }    public boolean execute(float key, Object val) {        try {            stream.writeFloat(key);            stream.writeObject(val);        } catch (IOException e) {            this.exception = e;            return false;        }        return true;    }    public boolean execute(float key, byte val) {        try {            stream.writeFloat(key);            stream.writeByte(val);        } catch (IOException e) {            this.exception = e;            return false;        }        return true;    }    public boolean execute(float key, short val) {        try {            stream.writeFloat(key);            stream.writeShort(val);        } catch (IOException e) {            this.exception = e;            return false;        }        return true;    }    public boolean execute(float key, int val) {        try {            stream.writeFloat(key);            stream.writeInt(val);        } catch (IOException e) {            this.exception = e;            return false;        }        return true;    }    public boolean execute(float key, long val) {        try {            stream.writeFloat(key);            stream.writeLong(val);        } catch (IOException e) {            this.exception = e;            return false;        }        return true;    }    public boolean execute(float key, double val) {        try {            stream.writeFloat(key);            stream.writeDouble(val);        } catch (IOException e) {            this.exception = e;            return false;        }        return true;    }    public boolean execute(float key, float val) {        try {            stream.writeFloat(key);            stream.writeFloat(val);        } catch (IOException e) {            this.exception = e;            return false;        }        return true;    }    public boolean execute(byte key, Object val) {        try {            stream.writeByte(key);            stream.writeObject(val);        } catch (IOException e) {            this.exception = e;            return false;        }        return true;    }    public boolean execute(byte key, byte val) {        try {            stream.writeByte(key);            stream.writeByte(val);        } catch (IOException e) {            this.exception = e;            return false;        }        return true;    }    public boolean execute(byte key, short val) {        try {            stream.writeByte(key);            stream.writeShort(val);        } catch (IOException e) {            this.exception = e;            return false;        }        return true;    }    public boolean execute(byte key, int val) {        try {            stream.writeByte(key);            stream.writeInt(val);        } catch (IOException e) {            this.exception = e;            return false;        }        return true;    }    public boolean execute(byte key, long val) {        try {            stream.writeByte(key);            stream.writeLong(val);        } catch (IOException e) {            this.exception = e;            return false;        }        return true;    }    public boolean execute(byte key, double val) {        try {            stream.writeByte(key);            stream.writeDouble(val);        } catch (IOException e) {            this.exception = e;            return false;        }        return true;    }    public boolean execute(byte key, float val) {        try {            stream.writeByte(key);            stream.writeFloat(val);        } catch (IOException e) {            this.exception = e;            return false;        }        return true;    }    public boolean execute(short key, Object val) {        try {            stream.writeShort(key);            stream.writeObject(val);        } catch (IOException e) {            this.exception = e;            return false;        }        return true;    }    public boolean execute(short key, byte val) {        try {            stream.writeShort(key);            stream.writeByte(val);        } catch (IOException e) {            this.exception = e;            return false;        }        return true;    }    public boolean execute(short key, short val) {        try {            stream.writeShort(key);            stream.writeShort(val);        } catch (IOException e) {            this.exception = e;            return false;        }        return true;    }    public boolean execute(short key, int val) {        try {            stream.writeShort(key);            stream.writeInt(val);        } catch (IOException e) {            this.exception = e;            return false;        }        return true;    }    public boolean execute(short key, long val) {        try {            stream.writeShort(key);            stream.writeLong(val);        } catch (IOException e) {            this.exception = e;            return false;        }        return true;    }    public boolean execute(short key, double val) {        try {            stream.writeShort(key);            stream.writeDouble(val);        } catch (IOException e) {            this.exception = e;            return false;        }        return true;    }    public boolean execute(short key, float val) {        try {            stream.writeShort(key);            stream.writeFloat(val);        } catch (IOException e) {            this.exception = e;            return false;        }        return true;    }}// SerializationProcedure

⌨️ 快捷键说明

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