Class ValidateObjectInputStream

java.lang.Object
java.io.InputStream
java.io.ObjectInputStream
com.luna.common.io.ValidateObjectInputStream
All Implemented Interfaces:
Closeable, DataInput, ObjectInput, ObjectStreamConstants, AutoCloseable

public class ValidateObjectInputStream extends ObjectInputStream
带有类验证的对象流,用于避免反序列化漏洞
详细见:https://xz.aliyun.com/t/41/
Since:
5.2.6
Author:
looly
  • Constructor Details

    • ValidateObjectInputStream

      public ValidateObjectInputStream(InputStream inputStream, Class<?>... acceptClasses) throws IOException
      构造
      Parameters:
      inputStream - 流
      acceptClasses - 白名单的类
      Throws:
      IOException - IO异常
  • Method Details