ESRIRecord r;
    public void cropShapeFile() throws IOException {        ESRIRecord r;        ESRIPolygonRecord pr;        int nRecordNum = 0;        int nRecords = 0;        sfin.readHeader();        sfout.setShapeType(sfin.fileShapeType);        switch (sfin.fileShapeType) {        case (ShapeUtils.SHAPE_TYPE_ARC):        case (ShapeUtils.SHAPE_TYPE_POLYGON):            while ((pr = (ESRIPolygonRecord) sfin.getNextRecord()) != null) {                nRecords++;                if (overlapBBTest(pr.bounds) != 0) {                    pr.recordNumber = nRecordNum + 1;                    sfout.add(pr);                    nRecordNum++;                    nRecords++;                }            }        }        System.out.println("Number of input records = " + (nRecords + 1));        System.out.println("Number of candidate records = " + nRecordNum);        if (nRecordNum > 0)            sfout.verify(true, true);        sfin.close();        sfout.close();    }