Package org.h2gis.functions.io.shp.internal

## Class MultiPointHandler

- java.lang.Object
- - org.h2gis.functions.io.shp.internal.MultiPointHandler

All Implemented Interfaces:
  `ShapeHandler`

    public class MultiPointHandler
    extends Object
    implements ShapeHandler

Author:
  aaime, Ian Schneider
See Also:
  "http://svn.geotools.org/geotools/tags/2.3.1/plugin/shapefile/src/org/geotools/data/shapefile/shp/MultiPointHandler.java"

### Constructor Summary

Constructors
`MultiPointHandler()` Creates new MultiPointHandler
`MultiPointHandler​(ShapeType type)`

### Method Summary

All Methods Instance Methods Concrete Methods
`int` `getLength​(org.locationtech.jts.geom.Geometry geometry)` Calcuates the record length of this object.
`ShapeType` `getShapeType()` Returns the shapefile shape type value for a point
`org.locationtech.jts.geom.Geometry` `read​(ReadBufferManager buffer, ShapeType type)` Read a geometry from the ByteBuffer.The buffer's position, byteOrder, and limit are set to that which is needed.
`void` `write​(WriteBufferManager buffer, org.locationtech.jts.geom.Geometry geometry)` Write the geometry into the ByteBuffer.

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

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

### Constructor Detail

#### MultiPointHandler

    public MultiPointHandler()

Creates new MultiPointHandler

#### MultiPointHandler

    public MultiPointHandler​(ShapeType type)
                      throws ShapefileException

Throws:
  `ShapefileException`

### Method Detail

#### getShapeType

    public ShapeType getShapeType()

Returns the shapefile shape type value for a point

Specified by:
  `getShapeType` in interface `ShapeHandler`
Returns:
  int Shapefile.POINT

#### getLength

    public int getLength​(org.locationtech.jts.geom.Geometry geometry)

Calcuates the record length of this object.

Specified by:
  `getLength` in interface `ShapeHandler`
Parameters:
  `geometry` - The geometry to analyze.
Returns:
  int The length of the record that this shapepoint will take up in a shapefile

#### read

    public org.locationtech.jts.geom.Geometry read​(ReadBufferManager buffer,
                                                   ShapeType type)
                                            throws IOException

Description copied from interface: `ShapeHandler`
Read a geometry from the ByteBuffer.The buffer's position, byteOrder, and limit are set to that which is needed. The record has been read as well as the shape type integer. The handler need not worry about reading unused information as the ShapefileReader will correctly adjust the buffer position after this call.

Specified by:
  `read` in interface `ShapeHandler`
Parameters:
  `buffer` - The ByteBuffer to read from.
  `type` - The shape type
Returns:
  A geometry object.
Throws:
  `IOException`

#### write

    public void write​(WriteBufferManager buffer,
                      org.locationtech.jts.geom.Geometry geometry)
               throws IOException

Description copied from interface: `ShapeHandler`
Write the geometry into the ByteBuffer. The position, byteOrder, and limit are all set. The handler is not responsible for writing the record or shape type integer.

Specified by:
  `write` in interface `ShapeHandler`
Parameters:
  `buffer` - The ByteBuffer to write to.
  `geometry` - The geometry to write.
Throws:
  `IOException`