com.hazelcast.nio

## Interface ObjectDataInput

- All Superinterfaces:
    DataInput, VersionAware
  All Known Subinterfaces:
    BufferObjectDataInput

      public interface ObjectDataInput
      extends DataInput, VersionAware

  Provides serialization methods for arrays of primitive types.

- - ### Method Summary

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method and Description
    --- | ---
    `ByteOrder` | `getByteOrder()`
    `ClassLoader` | `getClassLoader()` Returns class loader that internally used for objects.
    `com.hazelcast.internal.serialization.InternalSerializationService` | `getSerializationService()`
    `boolean[]` | `readBooleanArray()`
    `byte[]` | `readByteArray()`
    `char[]` | `readCharArray()`
    `Data` | `readData()`
    `<T> T` | `readDataAsObject()` Reads to stored Data as an object instead of a Data instance.
    `double[]` | `readDoubleArray()`
    `float[]` | `readFloatArray()`
    `int[]` | `readIntArray()`
    `long[]` | `readLongArray()`
    `<T> T` | `readObject()`
    `<T> T` | `readObject(Class aClass)`
    `short[]` | `readShortArray()`
    `String[]` | `readUTFArray()`

    - ### Methods inherited from interface java.io.DataInput

      `readBoolean, readByte, readChar, readDouble, readFloat, readFully, readFully, readInt, readLine, readLong, readShort, readUnsignedByte, readUnsignedShort, readUTF, skipBytes`

    - ### Methods inherited from interface com.hazelcast.nio.VersionAware

      `getVersion`

- - ### Method Detail

    - #### readByteArray

          byte[] readByteArray()
                        throws IOException

      Returns:
        the byte array read
      Throws:
        `IOException` - if it reaches end of file before finish reading

    - #### readBooleanArray

          boolean[] readBooleanArray()
                              throws IOException

      Returns:
        the boolean array read
      Throws:
        `IOException` - if it reaches end of file before finish reading

    - #### readCharArray

          char[] readCharArray()
                        throws IOException

      Returns:
        the char array read
      Throws:
        `IOException` - if it reaches end of file before finish reading

    - #### readIntArray

          int[] readIntArray()
                      throws IOException

      Returns:
        int array read
      Throws:
        `IOException` - if it reaches end of file before finish reading

    - #### readLongArray

          long[] readLongArray()
                        throws IOException

      Returns:
        long array read
      Throws:
        `IOException` - if it reaches end of file before finish reading

    - #### readDoubleArray

          double[] readDoubleArray()
                            throws IOException

      Returns:
        double array read
      Throws:
        `IOException` - if it reaches end of file before finish reading

    - #### readFloatArray

          float[] readFloatArray()
                          throws IOException

      Returns:
        float array read
      Throws:
        `IOException` - if it reaches end of file before finish reading

    - #### readShortArray

          short[] readShortArray()
                          throws IOException

      Returns:
        short array read
      Throws:
        `IOException` - if it reaches end of file before finish reading

    - #### readUTFArray

          String[] readUTFArray()
                         throws IOException

      Returns:
        String array read
      Throws:
        `IOException` - if it reaches end of file before finish reading

    - #### readObject

          <T> T readObject()
                    throws IOException

      Type Parameters:
        `T` - type of the object to be read
      Returns:
        object array read
      Throws:
        `IOException` - if it reaches end of file before finish reading

    - #### readDataAsObject

          <T> T readDataAsObject()
                          throws IOException

      Reads to stored Data as an object instead of a Data instance.

      The reason this method exists is that in some cases `Data` is stored on serialization, but on deserialization the actual object instance is needed. Getting access to the `Data` is easy by calling the `readData()` method. But de-serializing the `Data` to an object instance is impossible because there is no reference to the `SerializationService`.

      Type Parameters:
        `T` - type of the object to be read
      Returns:
        the read Object
      Throws:
        `IOException` - if it reaches end of file before finish reading

    - #### readObject

          <T> T readObject(Class aClass)
                    throws IOException

      Type Parameters:
        `T` - type of the object to be read
      Parameters:
        `aClass` - the type of the class to use when reading
      Returns:
        object array read
      Throws:
        `IOException` - if it reaches end of file before finish reading

    - #### readData

          Data readData()
                 throws IOException

      Returns:
        data read
      Throws:
        `IOException` - if it reaches end of file before finish reading

    - #### getClassLoader

          ClassLoader getClassLoader()

      Returns class loader that internally used for objects.
      Returns:
        classLoader

    - #### getByteOrder

          ByteOrder getByteOrder()

      Returns:
        ByteOrder BIG_ENDIAN or LITTLE_ENDIAN

    - #### getSerializationService

          com.hazelcast.internal.serialization.InternalSerializationService getSerializationService()

      Returns:
        serialization service for this object

Copyright © 2019. All rights reserved.