Package 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,BaseXYZSolid,dXdYdZSolid,dXdYZSolid,dXYdZSolid,dXYZSolid,GeoBaseAreaShape,GeoBaseBBox,GeoBaseCircle,GeoBaseCompositeAreaShape,GeoBaseCompositeMembershipShape,GeoBaseCompositeShape,GeoBaseDistanceShape,GeoBaseMembershipShape,GeoBasePath,GeoBasePolygon,GeoBaseShape,GeoComplexPolygon,GeoCompositeAreaShape,GeoCompositeMembershipShape,GeoCompositePolygon,GeoConcavePolygon,GeoConvexPolygon,GeoDegenerateHorizontalLine,GeoDegenerateLatitudeZone,GeoDegenerateLongitudeSlice,GeoDegeneratePath,GeoDegeneratePoint,GeoDegenerateVerticalLine,GeoExactCircle,GeoLatitudeZone,GeoLongitudeSlice,GeoNorthLatitudeZone,GeoNorthRectangle,GeoPoint,GeoRectangle,GeoS2Shape,GeoSouthLatitudeZone,GeoSouthRectangle,GeoStandardCircle,GeoStandardPath,GeoWideDegenerateHorizontalLine,GeoWideLongitudeSlice,GeoWideNorthRectangle,GeoWideRectangle,GeoWideSouthRectangle,GeoWorld,PlanetModel,StandardXYZSolid,XdYdZSolid,XdYZSolid,XYdZSolid
public interface SerializableObjectIndicates that a geo3d object can be serialized and deserialized.
-
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Modifier and Type Method Description static java.util.BitSetreadBitSet(java.io.InputStream inputStream)Read a bitset from a stream.static booleanreadBoolean(java.io.InputStream inputStream)Read a boolean from a stream.static byte[]readByteArray(java.io.InputStream inputStream)Read byte array.static java.lang.Class<?>readClass(java.io.InputStream inputStream)Read the class from the streamstatic doublereadDouble(java.io.InputStream inputStream)Read a double from a stream.static <T extends SerializableObject>
T[]readHeterogeneousArray(PlanetModel planetModel, java.io.InputStream inputStream, java.lang.Class<T> clazz)Read an array.static <T extends SerializableObject>
T[]readHomogeneousArray(PlanetModel planetModel, java.io.InputStream inputStream, java.lang.Class<T> clazz)Read an array.static intreadInt(java.io.InputStream inputStream)Read an int from a stream.static longreadLong(java.io.InputStream inputStream)Read a long from a stream.static SerializableObjectreadObject(java.io.InputStream inputStream)Read an object from a stream (for objects that do not need a PlanetModel).static SerializableObjectreadObject(java.io.InputStream inputStream, java.lang.Class<?> clazz)Instantiate a serializable object from a stream without a planet model.static SerializableObjectreadObject(PlanetModel planetModel, java.io.InputStream inputStream)Read an object from a stream (for objects that need a PlanetModel).static SerializableObjectreadObject(PlanetModel planetModel, java.io.InputStream inputStream, java.lang.Class<?> clazz)Instantiate a serializable object from a stream.static PlanetObjectreadPlanetObject(java.io.InputStream inputStream)Read a PlanetObject from a stream.static GeoPoint[]readPointArray(PlanetModel planetModel, java.io.InputStream inputStream)Read a point array.static GeoPolygon[]readPolygonArray(PlanetModel planetModel, java.io.InputStream inputStream)Read a polygon array.static java.lang.StringreadString(java.io.InputStream inputStream)Read a string from a stream.voidwrite(java.io.OutputStream outputStream)Serialize to output stream.static voidwriteBitSet(java.io.OutputStream outputStream, java.util.BitSet bitSet)Write a bitset to a stream.static voidwriteBoolean(java.io.OutputStream outputStream, boolean value)Write a boolean to a stream.static voidwriteByteArray(java.io.OutputStream outputStream, byte[] bytes)Write byte array.static voidwriteClass(java.io.OutputStream outputStream, java.lang.Class<?> clazz)Write a class to a stream.static voidwriteDouble(java.io.OutputStream outputStream, double value)Write a double to a stream.static voidwriteHeterogeneousArray(java.io.OutputStream outputStream, java.util.List<? extends SerializableObject> values)Write an array.static voidwriteHeterogeneousArray(java.io.OutputStream outputStream, SerializableObject[] values)Write an array.static voidwriteHomogeneousArray(java.io.OutputStream outputStream, java.util.List<? extends SerializableObject> values)Write an array.static voidwriteHomogeneousArray(java.io.OutputStream outputStream, SerializableObject[] values)Write an array.static voidwriteInt(java.io.OutputStream outputStream, int value)Write an int to a stream.static voidwriteLong(java.io.OutputStream outputStream, long value)Write a long to a stream.static voidwriteObject(java.io.OutputStream outputStream, SerializableObject object)Write an object to a stream.static voidwritePlanetObject(java.io.OutputStream outputStream, PlanetObject object)Write a PlanetObject to a stream.static voidwritePointArray(java.io.OutputStream outputStream, java.util.List<GeoPoint> values)Write a point array.static voidwritePointArray(java.io.OutputStream outputStream, GeoPoint[] values)Write a point array.static voidwritePolygonArray(java.io.OutputStream outputStream, java.util.List<GeoPolygon> values)Write a polygon array.static voidwritePolygonArray(java.io.OutputStream outputStream, GeoPolygon[] values)Write a polgon array.static voidwriteString(java.io.OutputStream outputStream, java.lang.String value)Write a string to a stream.
-
-
-
Method Detail
-
write
void write(java.io.OutputStream outputStream) throws java.io.IOExceptionSerialize to output stream.- Parameters:
outputStream- is the output stream to write to.- Throws:
java.io.IOException
-
writePlanetObject
static void writePlanetObject(java.io.OutputStream outputStream, PlanetObject object) throws java.io.IOExceptionWrite a PlanetObject to a stream.- Parameters:
outputStream- is the output stream.object- is the object to write.- Throws:
java.io.IOException
-
readPlanetObject
static PlanetObject readPlanetObject(java.io.InputStream inputStream) throws java.io.IOException
Read a PlanetObject from a stream.- Parameters:
inputStream- is the input stream.- Returns:
- the PlanetObject.
- Throws:
java.io.IOException
-
writeObject
static void writeObject(java.io.OutputStream outputStream, SerializableObject object) throws java.io.IOExceptionWrite an object to a stream.- Parameters:
outputStream- is the output stream.object- is the object to write.- Throws:
java.io.IOException
-
readObject
static SerializableObject readObject(PlanetModel planetModel, java.io.InputStream inputStream) throws java.io.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:
java.io.IOException
-
readObject
static SerializableObject readObject(java.io.InputStream inputStream) throws java.io.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:
java.io.IOException
-
readObject
static SerializableObject readObject(PlanetModel planetModel, java.io.InputStream inputStream, java.lang.Class<?> clazz) throws java.io.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:
java.io.IOException
-
readObject
static SerializableObject readObject(java.io.InputStream inputStream, java.lang.Class<?> clazz) throws java.io.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:
java.io.IOException
-
writeClass
static void writeClass(java.io.OutputStream outputStream, java.lang.Class<?> clazz) throws java.io.IOExceptionWrite a class to a stream.- Parameters:
outputStream- is the output stream.clazz- is the class to write.- Throws:
java.io.IOException
-
readClass
static java.lang.Class<?> readClass(java.io.InputStream inputStream) throws java.io.IOException, java.lang.ClassNotFoundExceptionRead the class from the stream- Parameters:
inputStream- is the stream to read from.- Returns:
- is the class read
- Throws:
java.io.IOExceptionjava.lang.ClassNotFoundException
-
writeString
static void writeString(java.io.OutputStream outputStream, java.lang.String value) throws java.io.IOExceptionWrite a string to a stream.- Parameters:
outputStream- is the output stream.value- is the string to write.- Throws:
java.io.IOException
-
readString
static java.lang.String readString(java.io.InputStream inputStream) throws java.io.IOExceptionRead a string from a stream.- Parameters:
inputStream- is the stream to read from.- Returns:
- the string that was read.
- Throws:
java.io.IOException
-
writePointArray
static void writePointArray(java.io.OutputStream outputStream, GeoPoint[] values) throws java.io.IOExceptionWrite a point array.- Parameters:
outputStream- is the output stream.values- is the array of points to write.- Throws:
java.io.IOException
-
writePointArray
static void writePointArray(java.io.OutputStream outputStream, java.util.List<GeoPoint> values) throws java.io.IOExceptionWrite a point array.- Parameters:
outputStream- is the output stream.values- is the list of points to write.- Throws:
java.io.IOException
-
readPointArray
static GeoPoint[] readPointArray(PlanetModel planetModel, java.io.InputStream inputStream) throws java.io.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:
java.io.IOException
-
writePolygonArray
static void writePolygonArray(java.io.OutputStream outputStream, GeoPolygon[] values) throws java.io.IOExceptionWrite a polgon array.- Parameters:
outputStream- is the output stream.values- is the array of points to write.- Throws:
java.io.IOException
-
writePolygonArray
static void writePolygonArray(java.io.OutputStream outputStream, java.util.List<GeoPolygon> values) throws java.io.IOExceptionWrite a polygon array.- Parameters:
outputStream- is the output stream.values- is the list of points to write.- Throws:
java.io.IOException
-
readPolygonArray
static GeoPolygon[] readPolygonArray(PlanetModel planetModel, java.io.InputStream inputStream) throws java.io.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:
java.io.IOException
-
writeHomogeneousArray
static void writeHomogeneousArray(java.io.OutputStream outputStream, SerializableObject[] values) throws java.io.IOExceptionWrite an array.- Parameters:
outputStream- is the output stream,.values- is the array.- Throws:
java.io.IOException
-
writeHomogeneousArray
static void writeHomogeneousArray(java.io.OutputStream outputStream, java.util.List<? extends SerializableObject> values) throws java.io.IOExceptionWrite an array.- Parameters:
outputStream- is the output stream,.values- is the array.- Throws:
java.io.IOException
-
readHomogeneousArray
static <T extends SerializableObject> T[] readHomogeneousArray(PlanetModel planetModel, java.io.InputStream inputStream, java.lang.Class<T> clazz) throws java.io.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:
java.io.IOException
-
writeHeterogeneousArray
static void writeHeterogeneousArray(java.io.OutputStream outputStream, SerializableObject[] values) throws java.io.IOExceptionWrite an array.- Parameters:
outputStream- is the output stream,.values- is the array.- Throws:
java.io.IOException
-
writeHeterogeneousArray
static void writeHeterogeneousArray(java.io.OutputStream outputStream, java.util.List<? extends SerializableObject> values) throws java.io.IOExceptionWrite an array.- Parameters:
outputStream- is the output stream,.values- is the array.- Throws:
java.io.IOException
-
readHeterogeneousArray
static <T extends SerializableObject> T[] readHeterogeneousArray(PlanetModel planetModel, java.io.InputStream inputStream, java.lang.Class<T> clazz) throws java.io.IOException
Read an array.- Parameters:
planetModel- is the planet model.inputStream- is the input stream.- Returns:
- the array.
- Throws:
java.io.IOException
-
writeBitSet
static void writeBitSet(java.io.OutputStream outputStream, java.util.BitSet bitSet) throws java.io.IOExceptionWrite a bitset to a stream.- Parameters:
outputStream- is the output stream.bitSet- is the bit set to write.- Throws:
java.io.IOException
-
readBitSet
static java.util.BitSet readBitSet(java.io.InputStream inputStream) throws java.io.IOExceptionRead a bitset from a stream.- Parameters:
inputStream- is the input stream.- Returns:
- the bitset read from the stream.
- Throws:
java.io.IOException
-
writeByteArray
static void writeByteArray(java.io.OutputStream outputStream, byte[] bytes) throws java.io.IOExceptionWrite byte array.- Parameters:
outputStream- is the output stream.bytes- is the byte array.- Throws:
java.io.IOException
-
readByteArray
static byte[] readByteArray(java.io.InputStream inputStream) throws java.io.IOExceptionRead byte array.- Parameters:
inputStream- is the input stream.- Returns:
- the byte array.
- Throws:
java.io.IOException
-
writeDouble
static void writeDouble(java.io.OutputStream outputStream, double value) throws java.io.IOExceptionWrite a double to a stream.- Parameters:
outputStream- is the output stream.value- is the value to write.- Throws:
java.io.IOException
-
readDouble
static double readDouble(java.io.InputStream inputStream) throws java.io.IOExceptionRead a double from a stream.- Parameters:
inputStream- is the input stream.- Returns:
- the double value read from the stream.
- Throws:
java.io.IOException
-
writeLong
static void writeLong(java.io.OutputStream outputStream, long value) throws java.io.IOExceptionWrite a long to a stream.- Parameters:
outputStream- is the output stream.value- is the value to write.- Throws:
java.io.IOException
-
readLong
static long readLong(java.io.InputStream inputStream) throws java.io.IOExceptionRead a long from a stream.- Parameters:
inputStream- is the input stream.- Returns:
- the long value read from the stream.
- Throws:
java.io.IOException
-
writeInt
static void writeInt(java.io.OutputStream outputStream, int value) throws java.io.IOExceptionWrite an int to a stream.- Parameters:
outputStream- is the output stream.value- is the value to write.- Throws:
java.io.IOException
-
readInt
static int readInt(java.io.InputStream inputStream) throws java.io.IOExceptionRead an int from a stream.- Parameters:
inputStream- is the input stream.- Returns:
- the value read from the stream.
- Throws:
java.io.IOException
-
writeBoolean
static void writeBoolean(java.io.OutputStream outputStream, boolean value) throws java.io.IOExceptionWrite a boolean to a stream.- Parameters:
outputStream- is the output stream.value- is the value to write.- Throws:
java.io.IOException
-
readBoolean
static boolean readBoolean(java.io.InputStream inputStream) throws java.io.IOExceptionRead a boolean from a stream.- Parameters:
inputStream- is the input stream.- Returns:
- the boolean value.
- Throws:
java.io.IOException
-
-