JAVA: Sample code to create a point and pass it to a GP tool?

Discussion created by drspatial on Jun 6, 2012
Hi Everybody,
Does anybody have a sample on how to create a recordset with a point object that I can then pass to a GP tool?  I have done this in C#.NET using the code below, but I want to convert this over to Java (which I am currently learning).  I can't find a Java sample for this in the documentation.  Thanks!

// Create the record set.
            IRecordSetInit rsInit = new IRecordSetInit();
            IRecordSet rs = rsInit as IRecordSet;

            // Create a new point feature and insert into the feature set.
            ICursor cursor = rsInit.Insert();
            IPoint pnt = new Point();
            pnt.PutCoords(-78.34, 39.223);

            IRowBuffer rowBuffer = rsInit.CreateRowBuffer();
            rowBuffer.set_Value(1, pnt);
            IGPRecordSet gpRS = new IGPRecordSet();
            gpRS.RecordSet = rs;