org.apache.lucene.spatial3d.geom

## Interface SerializableObject

- All Known Subinterfaces:
    GeoAreaShape, GeoBBox, GeoCircle, GeoDistanceShape, GeoMembershipShape, GeoPath, GeoPointShape, GeoPolygon, GeoShape, PlanetObject, XYZSolid
  All Known Implementing Classes:
    BasePlanetObject, GeoBaseCompositeShape, GeoBaseDistanceShape, GeoBaseMembershipShape, GeoBaseShape, GeoCompositeAreaShape, GeoCompositeMembershipShape, GeoCompositePolygon, GeoDegenerateVerticalLine, GeoPoint, PlanetModel

      public interface SerializableObject

  Indicates that a geo3d object can be serialized and deserialized.
  WARNING: This API is experimental and might change in incompatible ways in the next release.

- - ### Method Summary

    All Methods Static Methods Instance Methods Abstract Methods Default Methods
    Modifier and Type | Method and Description
    --- | ---
    `static BitSet` | `readBitSet(InputStream inputStream)` Read a bitset from a stream.
    `static boolean` | `readBoolean(InputStream inputStream)` Read a boolean from a stream.
    `static byte[]` | `readByteArray(InputStream inputStream)` Read byte array.
    `static Class<?>` | `readClass(InputStream inputStream)` Read the class from the stream
    `static double` | `readDouble(InputStream inputStream)` Read a double from a stream.
    `static <T extends SerializableObject> T[]` | `readHeterogeneousArray(PlanetModel planetModel, InputStream inputStream, Class<T> clazz)` Read an array.
    `static <T extends SerializableObject> T[]` | `readHomogeneousArray(PlanetModel planetModel, InputStream inputStream, Class<T> clazz)` Read an array.
    `static int` | `readInt(InputStream inputStream)` Read an int from a stream.
    `static long` | `readLong(InputStream inputStream)` Read a long from a stream.
    `static SerializableObject` | `readObject(InputStream inputStream)` Read an object from a stream (for objects that do not need a PlanetModel).
    `static SerializableObject` | `readObject(InputStream inputStream, Class<?> clazz)` Instantiate a serializable object from a stream without a planet model.
    `static SerializableObject` | `readObject(PlanetModel planetModel, InputStream inputStream)` Read an object from a stream (for objects that need a PlanetModel).
    `static SerializableObject` | `readObject(PlanetModel planetModel, InputStream inputStream, Class<?> clazz)` Instantiate a serializable object from a stream.
    `static PlanetObject` | `readPlanetObject(InputStream inputStream)` Read a PlanetObject from a stream.
    `static GeoPoint[]` | `readPointArray(PlanetModel planetModel, InputStream inputStream)` Read a point array.
    `static GeoPolygon[]` | `readPolygonArray(PlanetModel planetModel, InputStream inputStream)` Read a polygon array.
    `static String` | `readString(InputStream inputStream)` Read a string from a stream.
    `void` | `write(OutputStream outputStream)` Serialize to output stream.
    `static void` | `writeBitSet(OutputStream outputStream, BitSet bitSet)` Write a bitset to a stream.
    `static void` | `writeBoolean(OutputStream outputStream, boolean value)` Write a boolean to a stream.
    `static void` | `writeByteArray(OutputStream outputStream, byte[] bytes)` Write byte array.
    `static void` | `writeClass(OutputStream outputStream, Class<?> clazz)` Write a class to a stream.
    `static void` | `writeDouble(OutputStream outputStream, double value)` Write a double to a stream.
    `static void` | `writeHeterogeneousArray(OutputStream outputStream, List<? extends SerializableObject> values)` Write an array.
    `static void` | `writeHeterogeneousArray(OutputStream outputStream, SerializableObject[] values)` Write an array.
    `static void` | `writeHomogeneousArray(OutputStream outputStream, List<? extends SerializableObject> values)` Write an array.
    `static void` | `writeHomogeneousArray(OutputStream outputStream, SerializableObject[] values)` Write an array.
    `static void` | `writeInt(OutputStream outputStream, int value)` Write an int to a stream.
    `static void` | `writeLong(OutputStream outputStream, long value)` Write a long to a stream.
    `static void` | `writeObject(OutputStream outputStream, SerializableObject object)` Write an object to a stream.
    `static void` | `writePlanetObject(OutputStream outputStream, PlanetObject object)` Write a PlanetObject to a stream.
    `static void` | `writePointArray(OutputStream outputStream, GeoPoint[] values)` Write a point array.
    `static void` | `writePointArray(OutputStream outputStream, List<GeoPoint> values)` Write a point array.
    `static void` | `writePolygonArray(OutputStream outputStream, GeoPolygon[] values)` Write a polgon array.
    `static void` | `writePolygonArray(OutputStream outputStream, List<GeoPolygon> values)` Write a polygon array.
    `static void` | `writeString(OutputStream outputStream, String value)` Write a string to a stream.

- - ### Method Detail

    - #### write

          void write(OutputStream outputStream)
              throws IOException

      Serialize to output stream.
      Parameters:
        `outputStream` - is the output stream to write to.
      Throws:
        `IOException`

    - #### writePlanetObject

          static void writePlanetObject(OutputStream outputStream,
                                        PlanetObject object)
                                 throws IOException

      Write a PlanetObject to a stream.
      Parameters:
        `outputStream` - is the output stream.
        `object` - is the object to write.
      Throws:
        `IOException`

    - #### readPlanetObject

          static PlanetObject readPlanetObject(InputStream inputStream)
                                        throws IOException

      Read a PlanetObject from a stream.
      Parameters:
        `inputStream` - is the input stream.
      Returns:
        the PlanetObject.
      Throws:
        `IOException`

    - #### writeObject

          static void writeObject(OutputStream outputStream,
                                  SerializableObject object)
                           throws IOException

      Write an object to a stream.
      Parameters:
        `outputStream` - is the output stream.
        `object` - is the object to write.
      Throws:
        `IOException`

    - #### readObject

          static SerializableObject readObject(PlanetModel planetModel,
                                               InputStream inputStream)
                                        throws IOException

      Read an object from a stream (for objects that need a PlanetModel).
      Parameters:
        `planetModel` - is the planet model to use to deserialize the object.
        `inputStream` - is the input stream.
      Returns:
        the deserialized object.
      Throws:
        `IOException`

    - #### readObject

          static SerializableObject readObject(InputStream inputStream)
                                        throws IOException

      Read an object from a stream (for objects that do not need a PlanetModel).
      Parameters:
        `inputStream` - is the input stream.
      Returns:
        the deserialized object.
      Throws:
        `IOException`

    - #### readObject

          static SerializableObject readObject(PlanetModel planetModel,
                                               InputStream inputStream,
                                               Class<?> clazz)
                                        throws IOException

      Instantiate a serializable object from a stream.
      Parameters:
        `planetModel` - is the planet model.
        `inputStream` - is the input stream.
        `clazz` - is the class to instantiate.
      Throws:
        `IOException`

    - #### readObject

          static SerializableObject readObject(InputStream inputStream,
                                               Class<?> clazz)
                                        throws IOException

      Instantiate a serializable object from a stream without a planet model.
      Parameters:
        `inputStream` - is the input stream.
        `clazz` - is the class to instantiate.
      Throws:
        `IOException`

    - #### writeClass

          static void writeClass(OutputStream outputStream,
                                 Class<?> clazz)
                          throws IOException

      Write a class to a stream.
      Parameters:
        `outputStream` - is the output stream.
        `clazz` - is the class to write.
      Throws:
        `IOException`

    - #### readClass

          static Class<?> readClass(InputStream inputStream)
                             throws IOException,
                                    ClassNotFoundException

      Read the class from the stream
      Parameters:
        `inputStream` - is the stream to read from.
      Returns:
        is the class read
      Throws:
        `IOException`
        `ClassNotFoundException`

    - #### writeString

          static void writeString(OutputStream outputStream,
                                  String value)
                           throws IOException

      Write a string to a stream.
      Parameters:
        `outputStream` - is the output stream.
        `value` - is the string to write.
      Throws:
        `IOException`

    - #### readString

          static String readString(InputStream inputStream)
                            throws IOException

      Read a string from a stream.
      Parameters:
        `inputStream` - is the stream to read from.
      Returns:
        the string that was read.
      Throws:
        `IOException`

    - #### writePointArray

          static void writePointArray(OutputStream outputStream,
                                      GeoPoint[] values)
                               throws IOException

      Write a point array.
      Parameters:
        `outputStream` - is the output stream.
        `values` - is the array of points to write.
      Throws:
        `IOException`

    - #### writePointArray

          static void writePointArray(OutputStream outputStream,
                                      List<GeoPoint> values)
                               throws IOException

      Write a point array.
      Parameters:
        `outputStream` - is the output stream.
        `values` - is the list of points to write.
      Throws:
        `IOException`

    - #### readPointArray

          static GeoPoint[] readPointArray(PlanetModel planetModel,
                                           InputStream inputStream)
                                    throws IOException

      Read a point array.
      Parameters:
        `planetModel` - is the planet model.
        `inputStream` - is the input stream.
      Returns:
        the array of points that was read.
      Throws:
        `IOException`

    - #### writePolygonArray

          static void writePolygonArray(OutputStream outputStream,
                                        GeoPolygon[] values)
                                 throws IOException

      Write a polgon array.
      Parameters:
        `outputStream` - is the output stream.
        `values` - is the array of points to write.
      Throws:
        `IOException`

    - #### writePolygonArray

          static void writePolygonArray(OutputStream outputStream,
                                        List<GeoPolygon> values)
                                 throws IOException

      Write a polygon array.
      Parameters:
        `outputStream` - is the output stream.
        `values` - is the list of points to write.
      Throws:
        `IOException`

    - #### readPolygonArray

          static GeoPolygon[] readPolygonArray(PlanetModel planetModel,
                                               InputStream inputStream)
                                        throws IOException

      Read a polygon array.
      Parameters:
        `planetModel` - is the planet model.
        `inputStream` - is the input stream.
      Returns:
        the array of polygons that was read.
      Throws:
        `IOException`

    - #### writeHomogeneousArray

          static void writeHomogeneousArray(OutputStream outputStream,
                                            SerializableObject[] values)
                                     throws IOException

      Write an array.
      Parameters:
        `outputStream` - is the output stream,.
        `values` - is the array.
      Throws:
        `IOException`

    - #### writeHomogeneousArray

          static void writeHomogeneousArray(OutputStream outputStream,
                                            List<? extends SerializableObject> values)
                                     throws IOException

      Write an array.
      Parameters:
        `outputStream` - is the output stream,.
        `values` - is the array.
      Throws:
        `IOException`

    - #### readHomogeneousArray

          static <T extends SerializableObject> T[] readHomogeneousArray(PlanetModel planetModel,
                                                                         InputStream inputStream,
                                                                         Class<T> clazz)
                                                                  throws IOException

      Read an array.
      Parameters:
        `planetModel` - is the planet model.
        `inputStream` - is the input stream.
        `clazz` - is the class of the objects to read.
      Returns:
        the array.
      Throws:
        `IOException`

    - #### writeHeterogeneousArray

          static void writeHeterogeneousArray(OutputStream outputStream,
                                              SerializableObject[] values)
                                       throws IOException

      Write an array.
      Parameters:
        `outputStream` - is the output stream,.
        `values` - is the array.
      Throws:
        `IOException`

    - #### writeHeterogeneousArray

          static void writeHeterogeneousArray(OutputStream outputStream,
                                              List<? extends SerializableObject> values)
                                       throws IOException

      Write an array.
      Parameters:
        `outputStream` - is the output stream,.
        `values` - is the array.
      Throws:
        `IOException`

    - #### readHeterogeneousArray

          static <T extends SerializableObject> T[] readHeterogeneousArray(PlanetModel planetModel,
                                                                           InputStream inputStream,
                                                                           Class<T> clazz)
                                                                    throws IOException

      Read an array.
      Parameters:
        `planetModel` - is the planet model.
        `inputStream` - is the input stream.
      Returns:
        the array.
      Throws:
        `IOException`

    - #### writeBitSet

          static void writeBitSet(OutputStream outputStream,
                                  BitSet bitSet)
                           throws IOException

      Write a bitset to a stream.
      Parameters:
        `outputStream` - is the output stream.
        `bitSet` - is the bit set to write.
      Throws:
        `IOException`

    - #### readBitSet

          static BitSet readBitSet(InputStream inputStream)
                            throws IOException

      Read a bitset from a stream.
      Parameters:
        `inputStream` - is the input stream.
      Returns:
        the bitset read from the stream.
      Throws:
        `IOException`

    - #### writeByteArray

          static void writeByteArray(OutputStream outputStream,
                                     byte[] bytes)
                              throws IOException

      Write byte array.
      Parameters:
        `outputStream` - is the output stream.
        `bytes` - is the byte array.
      Throws:
        `IOException`

    - #### readByteArray

          static byte[] readByteArray(InputStream inputStream)
                               throws IOException

      Read byte array.
      Parameters:
        `inputStream` - is the input stream.
      Returns:
        the byte array.
      Throws:
        `IOException`

    - #### writeDouble

          static void writeDouble(OutputStream outputStream,
                                  double value)
                           throws IOException

      Write a double to a stream.
      Parameters:
        `outputStream` - is the output stream.
        `value` - is the value to write.
      Throws:
        `IOException`

    - #### readDouble

          static double readDouble(InputStream inputStream)
                            throws IOException

      Read a double from a stream.
      Parameters:
        `inputStream` - is the input stream.
      Returns:
        the double value read from the stream.
      Throws:
        `IOException`

    - #### writeLong

          static void writeLong(OutputStream outputStream,
                                long value)
                         throws IOException

      Write a long to a stream.
      Parameters:
        `outputStream` - is the output stream.
        `value` - is the value to write.
      Throws:
        `IOException`

    - #### readLong

          static long readLong(InputStream inputStream)
                        throws IOException

      Read a long from a stream.
      Parameters:
        `inputStream` - is the input stream.
      Returns:
        the long value read from the stream.
      Throws:
        `IOException`

    - #### writeInt

          static void writeInt(OutputStream outputStream,
                               int value)
                        throws IOException

      Write an int to a stream.
      Parameters:
        `outputStream` - is the output stream.
        `value` - is the value to write.
      Throws:
        `IOException`

    - #### readInt

          static int readInt(InputStream inputStream)
                      throws IOException

      Read an int from a stream.
      Parameters:
        `inputStream` - is the input stream.
      Returns:
        the value read from the stream.
      Throws:
        `IOException`

    - #### writeBoolean

          static void writeBoolean(OutputStream outputStream,
                                   boolean value)
                            throws IOException

      Write a boolean to a stream.
      Parameters:
        `outputStream` - is the output stream.
        `value` - is the value to write.
      Throws:
        `IOException`

    - #### readBoolean

          static boolean readBoolean(InputStream inputStream)
                              throws IOException

      Read a boolean from a stream.
      Parameters:
        `inputStream` - is the input stream.
      Returns:
        the boolean value.
      Throws:
        `IOException`

Copyright © 2000-2021 Apache Software Foundation. All Rights Reserved.