Class SafeDeserialiseObjectInputStream

  • All Implemented Interfaces:
    Closeable, DataInput, ObjectInput, ObjectStreamConstants, AutoCloseable

    public class SafeDeserialiseObjectInputStream
    extends ObjectInputStream
    Provides methods for the safe delserialising of object streams using lookahead method. Provide an object stream and an expected class to safely deserialise the stream and return the object. Example: bis = new ByteArrayInputStream(gis.readAllBytes()); return new SafeDeserialiseObjectInputStream(bis, String.class).readObject().toString();
    Since:
    19.11.0