try {
ByteArrayInputStream bytes =
new ByteArrayInputStream( wkb, 0, wkb.length-4 );
//read the geometry
Geometry g = new WKBReader().read( new InputStreamInStream( bytes ) );
//read the srid
int srid = 0;
srid |= wkb[wkb.length-4] & 0xFF;
srid <<= 8;