collection[i].setPage(page);
	public ImageData[] getPage(int page) throws IOException {		SearchClient client = new SearchClient("imilarity");		ImageSearchRequest request = new ImageSearchRequest(keywords);        		request.setResults(PAGE_SIZE);		request.setStart(BigInteger.valueOf((PAGE_SIZE * (page-1)) + 1));				ImageData[] collection = null;        try {            ImageSearchResults results = client.imageSearch(request);                                                                                            // Print out how many hits were found.            //System.out.println("Found " + results.getTotalResultsAvailable() +            //        " hits. Using the first " +			//		results.getTotalResultsReturned() + ".");                                                                                            collection = new ImageData[results.listResults().length];            for (int i = 0;             	i < results.listResults().length && 				((page-1) * PAGE_SIZE) + i < RESULTSET_SIZE;             	i++) {                            	ImageSearchResult result = results.listResults()[i];                try {                	//collection[i] = ImageData.loadUrl(result.getUrl());                	collection[i] = ImageData.loadUrl(result.getThumbnail().getUrl());                	collection[i].setPage(page);                	collection[i].setName(result.getTitle());                	collection[i].setUrl(new URL(result.getUrl()));                } catch(IOException e1) {                	System.err.println("IOException: " + e1.getMessage());                }            }        }        catch (SearchException e) {            // An issue with the XML or with the service.            throw new IOException(e.getMessage());        }		return collection;	}