FileDocCategorySizeDatePackage
SourceCmd.javaAPI DocGlassfish v2 API3071Fri May 04 22:24:50 BST 2007com.sun.cli.jmx.cmd

SourceCmd

public class SourceCmd extends CmdBase

Fields Summary
Constructors Summary
public SourceCmd(CmdEnv env)

		super( env );
	
Methods Summary
voidexecuteInternal()

		final String [] operands	= getOperands();
		final String	fileName	= operands[ 0 ];
		
		final CmdRunner	cmdRunner	= (CmdRunner)envGet( ENV_CMD_RUNNER );
		
		final java.io.InputStream	theFile	= new java.io.FileInputStream( fileName );
		final LineReaderImpl	lineReader	= new LineReaderImpl( theFile );
		
		String	line;
		while ( (line = lineReader.readLine( null )) != null )
		{
			CmdReader.processLine( line, cmdRunner );
		}
		
	
public static java.lang.String[]getNames()

		return( new String [] { "source" } );
	
intgetNumRequiredOperands()

		// there may be some, but there may be none
		return( 1 );
	
java.lang.StringgetUsage()

		return( CmdStrings.SOURCE_HELP.toString() );