public void read(DataInput dis) throws IOException {
  Debug.message("link","LinkBoundingPoly: read()");
  int polyLength=dis.readInt();
  points=new float[polyLength];
  float x, y;
  for (int i=0; i < points.length; i+=2) {
    y=dis.readFloat();
    x=dis.readFloat();
    if (i == 0) {
      minX=x;
      minY=y;
      maxX=x;
      maxY=y;
    }
    points[i]=y;
    points[i + 1]=x;
    if (x < minX)     minX=x;
    if (x > maxX)     maxX=x;
    if (y < minY)     minY=y;
    if (y > maxY)     maxY=y;
  }
}

public void read ( DataInput dis ) throws IOException { Debug . message ( "link" , "LinkBoundingPoly: read()" ) ; int polyLength = dis . readInt ( ) ; points = new float [ polyLength ] ; float x , y ; for ( int i = 0 ; i < points . length ; i += 2 ) { y = dis . readFloat ( ) ; x = dis . readFloat ( ) ; if ( i == 0 ) { minX = x ; minY = y ; maxX = x ; maxY = y ; } points [ i ] = y ; points [ i + 1 ] = x ; if ( x < minX ) minX = x ; if ( x > maxX ) maxX = x ; if ( y < minY ) minY = y ; if ( y > maxY ) maxY = y ; } }
read the bounding polygon off the input stream .
