* @throws IOException error sending request or reading the feed.
*/
private static void searchVolumes(BooksService service,
boolean authenticated)
throws IOException, ServiceException {
VolumeQuery query = new VolumeQuery(new URL(VOLUMES_FEED));
// exclude no-preview book (by default, they are included)
query.setMinViewability(VolumeQuery.MinViewability.PARTIAL);
System.out.println("\nEnter search terms: ");
String searchTerms = readLine();
System.out.println();
query.setFullTextQuery(searchTerms);
printUnderlined("Running Search for '" + searchTerms + "'");
VolumeFeed volumeFeed = service.query(query, VolumeFeed.class);
printVolumeFeed(volumeFeed);