⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 externalcommand.html

📁 GNetWatch is a free open source Java POJO application that enables real-time graphical monitoring an
💻 HTML
📖 第 1 页 / 共 2 页
字号:
<A NAME="sb"><!-- --></A><H3>
sb</H3>
<PRE>
private final java.lang.StringBuffer <B>sb</B></PRE>
<DL>
<DL>
</DL>
</DL>
<HR>

<A NAME="process"><!-- --></A><H3>
process</H3>
<PRE>
private java.lang.Process <B>process</B></PRE>
<DL>
<DL>
</DL>
</DL>
<HR>

<A NAME="reader"><!-- --></A><H3>
reader</H3>
<PRE>
private java.io.BufferedReader <B>reader</B></PRE>
<DL>
<DL>
</DL>
</DL>
<HR>

<A NAME="errReader"><!-- --></A><H3>
errReader</H3>
<PRE>
private java.io.BufferedReader <B>errReader</B></PRE>
<DL>
<DL>
</DL>
</DL>

<!-- ========= CONSTRUCTOR DETAIL ======== -->

<A NAME="constructor_detail"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
<B>Constructor Detail</B></FONT></TH>
</TR>
</TABLE>

<A NAME="ExternalCommand(java.lang.String[], java.lang.String)"><!-- --></A><H3>
ExternalCommand</H3>
<PRE>
public <B>ExternalCommand</B>(java.lang.String[]&nbsp;cmdLine,
                       java.lang.String&nbsp;directory)</PRE>
<DL>
<DD>Creates an ExternalCommand instance and saves the command line. any thread.
<P>
<DL>
<DT><B>Parameters:</B><DD><CODE>cmdLine</CODE> - command line.<DD><CODE>directory</CODE> - path to the current directory for the script to be launched.</DL>
</DL>
<HR>

<A NAME="ExternalCommand(java.lang.String[])"><!-- --></A><H3>
ExternalCommand</H3>
<PRE>
public <B>ExternalCommand</B>(java.lang.String[]&nbsp;cmdLine)</PRE>
<DL>
<DD>Creates an ExternalCommand instance and saves the command line. any thread.
<P>
<DL>
<DT><B>Parameters:</B><DD><CODE>cmdLine</CODE> - command line.</DL>
</DL>
<HR>

<A NAME="ExternalCommand(java.lang.String[], boolean)"><!-- --></A><H3>
ExternalCommand</H3>
<PRE>
public <B>ExternalCommand</B>(java.lang.String[]&nbsp;cmdLine,
                       boolean&nbsp;merge)</PRE>
<DL>
<DD>Creates an ExternalCommand instance and saves the command line. any thread.
<P>
<DL>
<DT><B>Parameters:</B><DD><CODE>cmdLine</CODE> - command line.<DD><CODE>merge</CODE> - merge standard output and standard error.</DL>
</DL>

<!-- ============ METHOD DETAIL ========== -->

<A NAME="method_detail"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
<B>Method Detail</B></FONT></TH>
</TR>
</TABLE>

<A NAME="readLine(java.io.Reader)"><!-- --></A><H3>
readLine</H3>
<PRE>
private java.lang.String <B>readLine</B>(java.io.Reader&nbsp;r)
                           throws java.io.IOException,
                                  java.lang.InterruptedException</PRE>
<DL>
<DD>Reads a line from the process output.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>r</CODE> - reader.
<DT><B>Returns:</B><DD>line read.
<DT><B>Throws:</B>
<DD><CODE>java.io.IOException</CODE> - IO exception.
<DD><CODE>java.lang.InterruptedException</CODE> - exception.</DL>
</DD>
</DL>
<HR>

<A NAME="runStdoutStderr()"><!-- --></A><H3>
runStdoutStderr</H3>
<PRE>
public java.lang.String <B>runStdoutStderr</B>()
                                 throws java.lang.InterruptedException</PRE>
<DL>
<DD>Reads the whole output.
<P>
<DD><DL>

<DT><B>Returns:</B><DD>whole output.
<DT><B>Throws:</B>
<DD><CODE>java.lang.InterruptedException</CODE> - exception.</DL>
</DD>
</DL>
<HR>

<A NAME="runStdout()"><!-- --></A><H3>
runStdout</H3>
<PRE>
public java.lang.String <B>runStdout</B>()
                           throws java.lang.InterruptedException</PRE>
<DL>
<DD>Reads the whole standard output.
<P>
<DD><DL>

<DT><B>Returns:</B><DD>whole standard output.
<DT><B>Throws:</B>
<DD><CODE>java.lang.InterruptedException</CODE> - interrupted.</DL>
</DD>
</DL>
<HR>

<A NAME="logArgs()"><!-- --></A><H3>
logArgs</H3>
<PRE>
public void <B>logArgs</B>()</PRE>
<DL>
<DD>Displays command line arguments. any thread.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>none.</CODE> - </DL>
</DD>
</DL>
<HR>

<A NAME="fork()"><!-- --></A><H3>
fork</H3>
<PRE>
public void <B>fork</B>()
          throws java.io.IOException</PRE>
<DL>
<DD>Launches a process but do not wait for its completion. any thread.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>none.</CODE> - 
<DT><B>Throws:</B>
<DD><CODE>java.io.IOException</CODE> - i/o exception <bold>before</bold> reading the process output stream.</DL>
</DD>
</DL>
<HR>

<A NAME="readStdoutStderr()"><!-- --></A><H3>
readStdoutStderr</H3>
<PRE>
public java.lang.String <B>readStdoutStderr</B>()
                                  throws java.io.IOException,
                                         java.lang.InterruptedException</PRE>
<DL>
<DD>Merges stdout and stderr. Waits for the end of the process output stream. Note that this method can return before the process completion. any thread.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>none.</CODE> - 
<DT><B>Returns:</B><DD>void.
<DT><B>Throws:</B>
<DD><CODE>java.io.IOException</CODE> - i/o exception <bold>while</bold> reading the process output stream.
<DD><CODE>java.lang.InterruptedException</CODE></DL>
</DD>
</DL>
<HR>

<A NAME="readStdout()"><!-- --></A><H3>
readStdout</H3>
<PRE>
public java.lang.String <B>readStdout</B>()
                            throws java.io.IOException,
                                   java.lang.InterruptedException</PRE>
<DL>
<DD>Reads stdout. Waits for the end of the process output stream. Note that this method can return before the process completion. any thread.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>none.</CODE> - 
<DT><B>Returns:</B><DD>void.
<DT><B>Throws:</B>
<DD><CODE>java.io.IOException</CODE> - i/o exception <bold>while</bold> reading the process output stream.
<DD><CODE>java.lang.InterruptedException</CODE></DL>
</DD>
</DL>
<HR>

<A NAME="readStderr()"><!-- --></A><H3>
readStderr</H3>
<PRE>
public java.lang.String <B>readStderr</B>()
                            throws java.io.IOException,
                                   java.lang.InterruptedException</PRE>
<DL>
<DD>Reads stderr. Waits for the closure of the process output stream. Note that this method can return before the process completion. any thread.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>none.</CODE> - 
<DT><B>Returns:</B><DD>void.
<DT><B>Throws:</B>
<DD><CODE>java.io.IOException</CODE> - i/o exception <bold>while</bold> reading the process output stream.
<DD><CODE>java.lang.InterruptedException</CODE></DL>
</DD>
</DL>
<HR>

<A NAME="readLineStdout()"><!-- --></A><H3>
readLineStdout</H3>
<PRE>
public java.lang.String <B>readLineStdout</B>()
                                throws java.io.IOException,
                                       java.lang.InterruptedException</PRE>
<DL>
<DD>Reads one line of the stdout. any thread.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>none.</CODE> - 
<DT><B>Returns:</B><DD>void.
<DT><B>Throws:</B>
<DD><CODE>java.io.IOException</CODE> - i/o exception <bold>while</bold> reading the process output stream.
<DD><CODE>java.lang.InterruptedException</CODE></DL>
</DD>
</DL>
<HR>

<A NAME="readLineStderr()"><!-- --></A><H3>
readLineStderr</H3>
<PRE>
public java.lang.String <B>readLineStderr</B>()
                                throws java.io.IOException,
                                       java.lang.InterruptedException</PRE>
<DL>
<DD>Reads one line of the stderr. any thread.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>none.</CODE> - 
<DT><B>Returns:</B><DD>void.
<DT><B>Throws:</B>
<DD><CODE>java.io.IOException</CODE> - i/o exception <bold>while</bold> reading the process output stream.
<DD><CODE>java.lang.InterruptedException</CODE></DL>
</DD>
</DL>
<HR>

<A NAME="end()"><!-- --></A><H3>
end</H3>
<PRE>
public void <B>end</B>()
         throws java.io.IOException</PRE>
<DL>
<DD>Make sure the underlying file descriptors are closed, to avoid maintening unused resources in an application server JVM for instance. any thread.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>none.</CODE> - 
<DT><B>Throws:</B>
<DD><CODE>java.io.IOException</CODE> - error while closing streams.</DL>
</DD>
</DL>
<HR>

<A NAME="kill()"><!-- --></A><H3>
kill</H3>
<PRE>
private void <B>kill</B>()</PRE>
<DL>
<DD>Kills the process. We do not reset process to null since it can be used to get exit code.  any thread.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>none.</CODE> - </DL>
</DD>
</DL>
<!-- ========= END OF CLASS DATA ========= -->
<HR>


<!-- ======= START OF BOTTOM NAVBAR ====== -->
<A NAME="navbar_bottom"><!-- --></A>
<A HREF="#skip-navbar_bottom" title="Skip navigation links"></A>
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
<TR>
<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
<A NAME="navbar_bottom_firstrow"><!-- --></A>
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
  <TR ALIGN="center" VALIGN="top">
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
  </TR>
</TABLE>
</TD>
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
</EM>
</TD>
</TR>

<TR>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
&nbsp;<A HREF="../../../../net/fenyo/gnetwatch/actions/ActionSNMP.html" title="class in net.fenyo.gnetwatch.actions"><B>PREV CLASS</B></A>&nbsp;
&nbsp;NEXT CLASS</FONT></TD>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
  <A HREF="../../../../index.html?net/fenyo/gnetwatch/actions/ExternalCommand.html" target="_top"><B>FRAMES</B></A>  &nbsp;
&nbsp;<A HREF="ExternalCommand.html" target="_top"><B>NO FRAMES</B></A>  &nbsp;
&nbsp;<SCRIPT type="text/javascript">
  <!--
  if(window==top) {
    document.writeln('<A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A>');
  }
  //-->
</SCRIPT>
<NOSCRIPT>
  <A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A>
</NOSCRIPT>


</FONT></TD>
</TR>
<TR>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
  SUMMARY:&nbsp;NESTED&nbsp;|&nbsp;<A HREF="#field_summary">FIELD</A>&nbsp;|&nbsp;<A HREF="#constructor_summary">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
DETAIL:&nbsp;<A HREF="#field_detail">FIELD</A>&nbsp;|&nbsp;<A HREF="#constructor_detail">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD>
</TR>
</TABLE>
<A NAME="skip-navbar_bottom"></A>
<!-- ======== END OF BOTTOM NAVBAR ======= -->

<HR>

</BODY>
</HTML>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -