@Test public void testWkbXDR() throws SQLException { String wkb = Wkb.toWkb( geom, ByteOrder.XDR ).toString(); testCase( wkb, geom ); }
@Test public void testWkbNDR() throws SQLException { String wkb = Wkb.toWkb( geom, ByteOrder.NDR ).toString(); testCase( wkb, geom ); }
/** * Encodes a <code>Geometry</code> into a WKB representation using the NDR (little-endian) byte-order. * * <p>This methods uses the default WKB dialect (Postgis v1.5 EWKB ).</p> * * @param geometry The <code>Geometry</code> to be encoded as WKB. * @return A buffer of bytes that contains the WKB-encoded <code>Geometry</code>. */ public static ByteBuffer toWkb(Geometry geometry) { return toWkb(geometry, ByteOrder.NDR); }
protected Object writeReplace() throws ObjectStreamException { ByteBuffer buffer = Wkb.toWkb(this); return new SerializationProxy(buffer); }