Class EntityContainerImporter
java.lang.Object
com.dna.jopt.io.importing.container.EntityContainerImporter
- All Implemented Interfaces:
IEntityImporter,IJOptImporter<IEntityContainer>,Serializable
@Deprecated(since="7.6.0",
forRemoval=false)
public class EntityContainerImporter
extends Object
implements IEntityImporter
Deprecated.
Reads the Java container format: an
IEntityContainer written with Java serialization, for
example by EntityContainerExporter.- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionDeprecated.The Java container format is replaced by the JSON snapshot: useOptimizationJSONImporter.read(InputStream)instead.read(InputStream fis) Deprecated.The Java container format is replaced by the JSON snapshot: useOptimizationJSONImporter.read(InputStream)instead.
-
Constructor Details
-
EntityContainerImporter
public EntityContainerImporter()Deprecated.
-
-
Method Details
-
read
@Deprecated(since="7.6.0", forRemoval=false) public Optional<IEntityContainer> read(InputStream fis) Deprecated.The Java container format is replaced by the JSON snapshot: useOptimizationJSONImporter.read(InputStream)instead.Reads a container from a stream of Java serialization.The stream is read with the allow list of
DeserializationFilter: the core's own classes and the JDK and library classes that a container holds. Any other class is refused before it is created. A refusal is logged as anInvalidClassExceptionthat names the refused class, and the result is empty, as for any stream that cannot be read.Each call logs one warning that the Java container format is deprecated.
- Specified by:
readin interfaceIEntityImporter- Specified by:
readin interfaceIJOptImporter<IEntityContainer>- Parameters:
fis- the stream- Returns:
- the container, or empty if the stream could not be read or holds a refused class
-
getEntityContainer
Deprecated.The Java container format is replaced by the JSON snapshot: useOptimizationJSONImporter.read(InputStream)instead.Returns the container of the last successfulread(InputStream).- Specified by:
getEntityContainerin interfaceIEntityImporter- Returns:
- the container, or null if no read has succeeded
-
OptimizationJSONImporter.read(InputStream)(or one of itsupdatemethods) and write it withOptimizationJSONExporter(export(IOptimization, OutputStream)). This class still works as before; each call ofread(InputStream)logs one warning.