1 23 24 package com.sun.enterprise.cli.framework; 25 26 import java.io.Writer ; 27 import java.io.Reader ; 28 import java.io.OutputStreamWriter ; 29 import java.io.InputStreamReader ; 30 import java.io.IOException ; 31 import java.io.FileReader ; 32 import java.io.FileNotFoundException ; 33 import java.io.BufferedWriter ; 34 import java.io.BufferedReader ; 35 36 37 46 47 public class More 48 { 49 public More(int linesPerPage, 50 Reader src, 51 Writer dest, 52 Reader fromUser, 53 Writer toUser, 54 String promptChar, 55 String prompt) throws IOException { 56 57 loopUntilQuit(new User(fromUser, toUser, promptChar, prompt), 58 new Pager(linesPerPage, src, dest)); 59 } 60 61 private void loopUntilQuit(User user, Pager pager) throws IOException { 62 do { 63 pager.nextPage(); 64 } while (pager.hasNext() && user.wantsToContinue()); 65 } 66 67 68 } 69 70 71 72 73 74 | Popular Tags |