com.sun.enterprise.admin.cli
Class More

java.lang.Object
  extended by com.sun.enterprise.admin.cli.More

public class More
extends Object

More.java

Author:
Toby H Ferguson This class provides a primitive more(1) functionality, paging through the given file, with an optional pagelength.

Field Summary
private  BufferedReader in
           
private  BufferedWriter out
           
private  String prompt
           
private  String quit
           
 
Constructor Summary
More(int linesPerPage, Reader src, Writer dest, Reader fromUser, Writer toUser, String quitPrefix, String prompt)
           
 
Method Summary
(package private)  boolean wantsToContinue()
          Return false iff the line read from the user starts with the quit character.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

in

private BufferedReader in

out

private BufferedWriter out

quit

private String quit

prompt

private String prompt
Constructor Detail

More

public More(int linesPerPage,
            Reader src,
            Writer dest,
            Reader fromUser,
            Writer toUser,
            String quitPrefix,
            String prompt)
     throws IOException
Throws:
IOException
Method Detail

wantsToContinue

boolean wantsToContinue()
                  throws IOException
Return false iff the line read from the user starts with the quit character. This is a blocking call, waiting on input from the user

Throws:
IOException


Copyright © 2012 GlassFish Community. All Rights Reserved.