org.apache.ignite.ml.inference.reader

## Class InMemoryModelReader

- java.lang.Object
- - org.apache.ignite.ml.inference.reader.InMemoryModelReader

- All Implemented Interfaces:
    Serializable, ModelReader

      public class InMemoryModelReader
      extends Object
      implements ModelReader

  Model reader that reads predefined array of bytes.
  See Also:
    Serialized Form

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `InMemoryModelReader(byte[] data)` Constructs a new instance of in-memory model reader that returns specified byte array.
    `InMemoryModelReader(T obj)` Constructs a new instance of in-memory model reader that returns serialized specified object.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `byte[]` | `read()` Rads model and returns it in serialized form as byte array.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### InMemoryModelReader

          public InMemoryModelReader(byte[] data)

      Constructs a new instance of in-memory model reader that returns specified byte array.
      Parameters:
        `data` - Data.

    - #### InMemoryModelReader

          public InMemoryModelReader(T obj)

      Constructs a new instance of in-memory model reader that returns serialized specified object.
      Type Parameters:
        `T` - Type of data object.
      Parameters:
        `obj` - Data object.

  - ### Method Detail

    - #### read

          public byte[] read()

      Rads model and returns it in serialized form as byte array.
      Specified by:
        `read` in interface `ModelReader`
      Returns:
        Inference model in serialized form as byte array.

${current.year} Copyright © Apache Software Foundation
| Follow @ApacheIgnite
Ignite Database and Caching Platform | : ver. 2.15.0
Release Date | : April 25 2023