<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Frameset//EN""http://www.w3.org/TR/REC-html40/frameset.dtd"> <!--NewPage--> <HTML> <HEAD> <!-- Generated by javadoc on Mon Aug 05 13:17:01 EDT 2002 --> <TITLE> Perforce API: Class P4Process </TITLE> <LINK REL ="stylesheet" TYPE="text/css" HREF="../../../stylesheet.css" TITLE="Style"> </HEAD> <BODY BGCOLOR="white"> <!-- ========== START OF NAVBAR ========== --> <A NAME="navbar_top"><!-- --></A> <TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0"> <TR> <TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A NAME="navbar_top_firstrow"><!-- --></A> <TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3"> <TR ALIGN="center" VALIGN="top"> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD> <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="class-use/P4Process.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD> </TR> </TABLE> </TD> <TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM> <a target="_top" href="http://www.perforce.com/"><img alt="Perforce" border="0" height="44" width="151" src="doc-files/perforce_logo.gif"></a></EM> </TD> </TR> <TR> <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> <A HREF="../../../com/perforce/api/P4JNI.html"><B>PREV CLASS</B></A> NEXT CLASS</FONT></TD> <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> <A HREF="../../../index.html" TARGET="_top"><B>FRAMES</B></A> <A HREF="P4Process.html" TARGET="_top"><B>NO FRAMES</B></A></FONT></TD> </TR> <TR> <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> SUMMARY: INNER | FIELD | <A HREF="#constructor_summary">CONSTR</A> | <A HREF="#method_summary">METHOD</A></FONT></TD> <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> DETAIL: FIELD | <A HREF="#constructor_detail">CONSTR</A> | <A HREF="#method_detail">METHOD</A></FONT></TD> </TR> </TABLE> <!-- =========== END OF NAVBAR =========== --> <HR> <!-- ======== START OF CLASS DATA ======== --> <H2> <FONT SIZE="-1"> com.perforce.api</FONT> <BR> Class P4Process</H2> <PRE> <A HREF="http://java.sun.com/products/jdk/1.3/docs/api/java/lang/Object.html">java.lang.Object</A> | +--<B>com.perforce.api.P4Process</B> </PRE> <HR> <DL> <DT>public class <B>P4Process</B><DT>extends <A HREF="http://java.sun.com/products/jdk/1.3/docs/api/java/lang/Object.html">Object</A></DL> <P> Handles the execution of all perforce commands. This class can be used directly, but the preferred use of this API is through the <A HREF="../../../com/perforce/api/SourceControlObject.html"><CODE>SourceControlObject</CODE></A> subclasses. <p> <b>Example Usage:</b> <pre> String l; Env env = new Env(); String[] cmd = { "p4", "branches"}; try { P4Process p = new P4Process(env); p.exec(cmd); while (null != (l = p.readLine())) { // Parse the output. } p.close(); } catch (Exception ex) { throw new PerforceException(ex.getMessage()); } </pre> <P> <DL> <DT><B>Version: </B><DD>$Date: 2006/06/11 $ $Revision: #1 $</DD> <DT><B>Author: </B><DD><a href="mailto:david@markley.cc">David Markley</a></DD> <DT><B>See Also: </B><DD><A HREF="../../../com/perforce/api/Env.html"><CODE>Env</CODE></A>, <A HREF="../../../com/perforce/api/SourceControlObject.html"><CODE>SourceControlObject</CODE></A>, <A HREF="http://java.sun.com/products/jdk/1.3/docs/api/java/lang/Thread.html"><CODE>Thread</CODE></A></DL> <HR> <P> <!-- ======== INNER CLASS SUMMARY ======== --> <!-- =========== FIELD SUMMARY =========== --> <!-- ======== CONSTRUCTOR SUMMARY ======== --> <A NAME="constructor_summary"><!-- --></A> <TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"> <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> <TD COLSPAN=2><FONT SIZE="+2"> <B>Constructor Summary</B></FONT></TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD><CODE><B><A HREF="../../../com/perforce/api/P4Process.html#P4Process()">P4Process</A></B>()</CODE> <BR> Default no-argument constructor.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD><CODE><B><A HREF="../../../com/perforce/api/P4Process.html#P4Process(com.perforce.api.Env)">P4Process</A></B>(<A HREF="../../../com/perforce/api/Env.html">Env</A> e)</CODE> <BR> Constructor that specifies the source control environment.</TD> </TR> </TABLE> <!-- ========== METHOD SUMMARY =========== --> <A NAME="method_summary"><!-- --></A> <TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"> <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> <TD COLSPAN=2><FONT SIZE="+2"> <B>Method Summary</B></FONT></TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> int</CODE></FONT></TD> <TD><CODE><B><A HREF="../../../com/perforce/api/P4Process.html#close()">close</A></B>()</CODE> <BR> Waits for the underlying process to exit and closes it down.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> int</CODE></FONT></TD> <TD><CODE><B><A HREF="../../../com/perforce/api/P4Process.html#close(java.io.PrintStream)">close</A></B>(<A HREF="http://java.sun.com/products/jdk/1.3/docs/api/java/io/PrintStream.html">PrintStream</A> out)</CODE> <BR> Waits for the process to exit and closes out the process.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> void</CODE></FONT></TD> <TD><CODE><B><A HREF="../../../com/perforce/api/P4Process.html#exec(java.lang.String[])">exec</A></B>(<A HREF="http://java.sun.com/products/jdk/1.3/docs/api/java/lang/String.html">String</A>[] cmd)</CODE> <BR> Executes a p4 command.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> void</CODE></FONT></TD> <TD><CODE><B><A HREF="../../../com/perforce/api/P4Process.html#flush()">flush</A></B>()</CODE> <BR> Flushes the output stream to the process.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE>static <A HREF="../../../com/perforce/api/P4Process.html">P4Process</A></CODE></FONT></TD> <TD><CODE><B><A HREF="../../../com/perforce/api/P4Process.html#getBase()">getBase</A></B>()</CODE> <BR> Returns the base process for this class.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> <A HREF="../../../com/perforce/api/Env.html">Env</A></CODE></FONT></TD> <TD><CODE><B><A HREF="../../../com/perforce/api/P4Process.html#getEnv()">getEnv</A></B>()</CODE> <BR> Returns the environment in use by this process.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> int</CODE></FONT></TD> <TD><CODE><B><A HREF="../../../com/perforce/api/P4Process.html#getExitCode()">getExitCode</A></B>()</CODE> <BR> Returns the exit code returned when the underlying process exits.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> boolean</CODE></FONT></TD> <TD><CODE><B><A HREF="../../../com/perforce/api/P4Process.html#getRawMode()">getRawMode</A></B>()</CODE> <BR> Returns the status of raw mode for this process.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> long</CODE></FONT></TD> <TD><CODE><B><A HREF="../../../com/perforce/api/P4Process.html#getServerTimeout()">getServerTimeout</A></B>()</CODE> <BR> Return the server timeout threshold.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> void</CODE></FONT></TD> <TD><CODE><B><A HREF="../../../com/perforce/api/P4Process.html#outClose()">outClose</A></B>()</CODE> <BR> Flushes and closes the output stream to the process.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> void</CODE></FONT></TD> <TD><CODE><B><A HREF="../../../com/perforce/api/P4Process.html#print(java.lang.String)">print</A></B>(<A HREF="http://java.sun.com/products/jdk/1.3/docs/api/java/lang/String.html">String</A> line)</CODE> <BR> Writes <code>line</code> to the standard input of the process.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> void</CODE></FONT></TD> <TD><CODE><B><A HREF="../../../com/perforce/api/P4Process.html#println(java.lang.String)">println</A></B>(<A HREF="http://java.sun.com/products/jdk/1.3/docs/api/java/lang/String.html">String</A> line)</CODE> <BR> Writes <code>line</code> to the standard input of the process.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> <A HREF="http://java.sun.com/products/jdk/1.3/docs/api/java/lang/String.html">String</A></CODE></FONT></TD> <TD><CODE><B><A HREF="../../../com/perforce/api/P4Process.html#readLine()">readLine</A></B>()</CODE> <BR> Returns the next line from the process, or null if the command has completed its execution.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE>static void</CODE></FONT></TD> <TD><CODE><B><A HREF="../../../com/perforce/api/P4Process.html#setBase(com.perforce.api.P4Process)">setBase</A></B>(<A HREF="../../../com/perforce/api/P4Process.html">P4Process</A> b)</CODE> <BR> Sets the base process to be used when new processes are instantiated.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> void</CODE></FONT></TD> <TD><CODE><B><A HREF="../../../com/perforce/api/P4Process.html#setEnv(com.perforce.api.Env)">setEnv</A></B>(<A HREF="../../../com/perforce/api/Env.html">Env</A> e)</CODE> <BR> Sets the environment to use.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> void</CODE></FONT></TD> <TD><CODE><B><A HREF="../../../com/perforce/api/P4Process.html#setEventLog(com.perforce.api.EventLog)">setEventLog</A></B>(<A HREF="../../../com/perforce/api/EventLog.html">EventLog</A> log)</CODE> <BR> Sets the event log.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> void</CODE></FONT></TD> <TD><CODE><B><A HREF="../../../com/perforce/api/P4Process.html#setRawMode(boolean)">setRawMode</A></B>(boolean raw)</CODE> <BR> In raw mode, the process will return the prefix added by the "-s" command line option.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> void</CODE></FONT></TD> <TD><CODE><B><A HREF="../../../com/perforce/api/P4Process.html#setServerTimeout(long)">setServerTimeout</A></B>(long threshold)</CODE> <BR> Set the server timeout threshold.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> <A HREF="http://java.sun.com/products/jdk/1.3/docs/api/java/lang/String.html">String</A></CODE></FONT></TD> <TD><CODE><B><A HREF="../../../com/perforce/api/P4Process.html#toString()">toString</A></B>()</CODE> <BR> </TD> </TR> </TABLE> <A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A> <TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"> <TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor"> <TD><B>Methods inherited from class java.lang.<A HREF="http://java.sun.com/products/jdk/1.3/docs/api/java/lang/Object.html">Object</A></B></TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD><CODE><A HREF="http://java.sun.com/products/jdk/1.3/docs/api/java/lang/Object.html#clone()">clone</A>, <A HREF="http://java.sun.com/products/jdk/1.3/docs/api/java/lang/Object.html#equals(java.lang.Object)">equals</A>, <A HREF="http://java.sun.com/products/jdk/1.3/docs/api/java/lang/Object.html#finalize()">finalize</A>, <A HREF="http://java.sun.com/products/jdk/1.3/docs/api/java/lang/Object.html#getClass()">getClass</A>, <A HREF="http://java.sun.com/products/jdk/1.3/docs/api/java/lang/Object.html#hashCode()">hashCode</A>, <A HREF="http://java.sun.com/products/jdk/1.3/docs/api/java/lang/Object.html#notify()">notify</A>, <A HREF="http://java.sun.com/products/jdk/1.3/docs/api/java/lang/Object.html#notifyAll()">notifyAll</A>, <A HREF="http://java.sun.com/products/jdk/1.3/docs/api/java/lang/Object.html#wait()">wait</A>, <A HREF="http://java.sun.com/products/jdk/1.3/docs/api/java/lang/Object.html#wait(long)">wait</A>, <A HREF="http://java.sun.com/products/jdk/1.3/docs/api/java/lang/Object.html#wait(long, int)">wait</A></CODE></TD> </TR> </TABLE> <P> <!-- ============ FIELD DETAIL =========== --> <!-- ========= CONSTRUCTOR DETAIL ======== --> <A NAME="constructor_detail"><!-- --></A> <TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"> <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> <TD COLSPAN=1><FONT SIZE="+2"> <B>Constructor Detail</B></FONT></TD> </TR> </TABLE> <A NAME="P4Process()"><!-- --></A><H3> P4Process</H3> <PRE> public <B>P4Process</B>()</PRE> <DL> <DD>Default no-argument constructor. If the runtime has not been established, this constructor will set it up. No environment is specified, so the base environment will be used if it exists.<DD><DL> <DT><B>See Also: </B><DD><A HREF="../../../com/perforce/api/P4Process.html#getBase()"><CODE>getBase()</CODE></A></DL> </DD> </DL> <HR> <A NAME="P4Process(com.perforce.api.Env)"><!-- --></A><H3> P4Process</H3> <PRE> public <B>P4Process</B>(<A HREF="../../../com/perforce/api/Env.html">Env</A> e)</PRE> <DL> <DD>Constructor that specifies the source control environment.<DD><DL> <DT><B>Parameters:</B><DD><CODE>e</CODE> - Source control environment to use.</DL> </DD> </DL> <!-- ============ METHOD DETAIL ========== --> <A NAME="method_detail"><!-- --></A> <TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"> <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> <TD COLSPAN=1><FONT SIZE="+2"> <B>Method Detail</B></FONT></TD> </TR> </TABLE> <A NAME="close()"><!-- --></A><H3> close</H3> <PRE> public int <B>close</B>() throws <A HREF="http://java.sun.com/products/jdk/1.3/docs/api/java/io/IOException.html">IOException</A></PRE> <DL> <DD>Waits for the underlying process to exit and closes it down. This method should be called after the <A HREF="../../../com/perforce/api/P4Process.html#exec(java.lang.String[])"><CODE>exec</CODE></A> method in order to close things out properly. Errors are sent to System.err.<DD><DL> <DT><B>Returns:</B><DD>The exit value of the underlying process.<DT><B>See Also: </B><DD><CODE>System</CODE></DL> </DD> </DL> <HR> <A NAME="close(java.io.PrintStream)"><!-- --></A><H3> close</H3> <PRE> public int <B>close</B>(<A HREF="http://java.sun.com/products/jdk/1.3/docs/api/java/io/PrintStream.html">PrintStream</A> out) throws <A HREF="http://java.sun.com/products/jdk/1.3/docs/api/java/io/IOException.html">IOException</A></PRE> <DL> <DD>Waits for the process to exit and closes out the process. This method should be called after the <A HREF="../../../com/perforce/api/P4Process.html#exec(java.lang.String[])"><CODE>exec</CODE></A> method in order to close things down properly.<DD><DL> <DT><B>Parameters:</B><DD><CODE>out</CODE> - The stream to which any errors should be sent.<DT><B>Returns:</B><DD>The exit value of the underlying process.</DL> </DD> </DL> <HR> <A NAME="exec(java.lang.String[])"><!-- --></A><H3> exec</H3> <PRE> public void <B>exec</B>(<A HREF="http://java.sun.com/products/jdk/1.3/docs/api/java/lang/String.html">String</A>[] cmd) throws <A HREF="http://java.sun.com/products/jdk/1.3/docs/api/java/io/IOException.html">IOException</A></PRE> <DL> <DD>Executes a p4 command. This uses the class environment information to execute the p4 command specified in the String array. This array contains all the command line arguments that will be specified for execution, including "p4" in the first position.<DD><DL> <DT><B>Parameters:</B><DD><CODE>cmd</CODE> - Array of command line arguments ("p4" must be first).</DL> </DD> </DL> <HR> <A NAME="flush()"><!-- --></A><H3> flush</H3> <PRE> public void <B>flush</B>() throws <A HREF="http://java.sun.com/products/jdk/1.3/docs/api/java/io/IOException.html">IOException</A></PRE> <DL> <DD>Flushes the output stream to the process.</DL> <HR> <A NAME="getBase()"><!-- --></A><H3> getBase</H3> <PRE> public static <A HREF="../../../com/perforce/api/P4Process.html">P4Process</A> <B>getBase</B>()</PRE> <DL> <DD>Returns the base process for this class. The base process is set when this class is first instantiated. The base process is used when other <code>P4Process</code> are instantiated to share settings, including the <A HREF="../../../com/perforce/api/Env.html"><CODE>source control environment</CODE></A>.<DD><DL> <DT><B>Returns:</B><DD>Source control environment.<DT><B>See Also: </B><DD><A HREF="../../../com/perforce/api/Env.html"><CODE>Env</CODE></A></DL> </DD> </DL> <HR> <A NAME="getEnv()"><!-- --></A><H3> getEnv</H3> <PRE> public <A HREF="../../../com/perforce/api/Env.html">Env</A> <B>getEnv</B>()</PRE> <DL> <DD>Returns the environment in use by this process.<DD><DL> <DT><B>Returns:</B><DD>Source control environment.</DL> </DD> </DL> <HR> <A NAME="getExitCode()"><!-- --></A><H3> getExitCode</H3> <PRE> public int <B>getExitCode</B>()</PRE> <DL> <DD>Returns the exit code returned when the underlying process exits.<DD><DL> <DT><B>Returns:</B><DD>Typical UNIX style return code.</DL> </DD> </DL> <HR> <A NAME="getRawMode()"><!-- --></A><H3> getRawMode</H3> <PRE> public boolean <B>getRawMode</B>()</PRE> <DL> <DD>Returns the status of raw mode for this process.</DL> <HR> <A NAME="getServerTimeout()"><!-- --></A><H3> getServerTimeout</H3> <PRE> public long <B>getServerTimeout</B>()</PRE> <DL> <DD>Return the server timeout threshold.</DL> <HR> <A NAME="outClose()"><!-- --></A><H3> outClose</H3> <PRE> public void <B>outClose</B>() throws <A HREF="http://java.sun.com/products/jdk/1.3/docs/api/java/io/IOException.html">IOException</A></PRE> <DL> <DD>Flushes and closes the output stream to the process.</DL> <HR> <A NAME="print(java.lang.String)"><!-- --></A><H3> print</H3> <PRE> public void <B>print</B>(<A HREF="http://java.sun.com/products/jdk/1.3/docs/api/java/lang/String.html">String</A> line) throws <A HREF="http://java.sun.com/products/jdk/1.3/docs/api/java/io/IOException.html">IOException</A></PRE> <DL> <DD>Writes <code>line</code> to the standard input of the process.<DD><DL> <DT><B>Parameters:</B><DD><CODE>line</CODE> - Line to be written.</DL> </DD> </DL> <HR> <A NAME="println(java.lang.String)"><!-- --></A><H3> println</H3> <PRE> public void <B>println</B>(<A HREF="http://java.sun.com/products/jdk/1.3/docs/api/java/lang/String.html">String</A> line) throws <A HREF="http://java.sun.com/products/jdk/1.3/docs/api/java/io/IOException.html">IOException</A></PRE> <DL> <DD>Writes <code>line</code> to the standard input of the process. A newline is appended to the output.<DD><DL> <DT><B>Parameters:</B><DD><CODE>line</CODE> - Line to be written.</DL> </DD> </DL> <HR> <A NAME="readLine()"><!-- --></A><H3> readLine</H3> <PRE> public <A HREF="http://java.sun.com/products/jdk/1.3/docs/api/java/lang/String.html">String</A> <B>readLine</B>()</PRE> <DL> <DD>Returns the next line from the process, or null if the command has completed its execution.</DL> <HR> <A NAME="setBase(com.perforce.api.P4Process)"><!-- --></A><H3> setBase</H3> <PRE> public static void <B>setBase</B>(<A HREF="../../../com/perforce/api/P4Process.html">P4Process</A> b)</PRE> <DL> <DD>Sets the base process to be used when new processes are instantiated.<DD><DL> <DT><B>See Also: </B><DD><A HREF="../../../com/perforce/api/P4Process.html#getBase()"><CODE>getBase()</CODE></A></DL> </DD> </DL> <HR> <A NAME="setEnv(com.perforce.api.Env)"><!-- --></A><H3> setEnv</H3> <PRE> public void <B>setEnv</B>(<A HREF="../../../com/perforce/api/Env.html">Env</A> e)</PRE> <DL> <DD>Sets the environment to use.<DD><DL> <DT><B>Parameters:</B><DD><CODE>e</CODE> - Source control environment.</DL> </DD> </DL> <HR> <A NAME="setEventLog(com.perforce.api.EventLog)"><!-- --></A><H3> setEventLog</H3> <PRE> public void <B>setEventLog</B>(<A HREF="../../../com/perforce/api/EventLog.html">EventLog</A> log)</PRE> <DL> <DD>Sets the event log. Any events that should be logged will be logged through the EventLog specified here.<DD><DL> <DT><B>Parameters:</B><DD><CODE>log</CODE> - Log for all events.</DL> </DD> </DL> <HR> <A NAME="setRawMode(boolean)"><!-- --></A><H3> setRawMode</H3> <PRE> public void <B>setRawMode</B>(boolean raw)</PRE> <DL> <DD>In raw mode, the process will return the prefix added by the "-s" command line option. The default is false.</DL> <HR> <A NAME="setServerTimeout(long)"><!-- --></A><H3> setServerTimeout</H3> <PRE> public void <B>setServerTimeout</B>(long threshold)</PRE> <DL> <DD>Set the server timeout threshold.</DL> <HR> <A NAME="toString()"><!-- --></A><H3> toString</H3> <PRE> public <A HREF="http://java.sun.com/products/jdk/1.3/docs/api/java/lang/String.html">String</A> <B>toString</B>()</PRE> <DL> <DD><DL> <DT><B>Overrides:</B><DD><CODE><A HREF="http://java.sun.com/products/jdk/1.3/docs/api/java/lang/Object.html#toString()">toString</A></CODE> in class <CODE><A HREF="http://java.sun.com/products/jdk/1.3/docs/api/java/lang/Object.html">Object</A></CODE></DL> </DD> </DL> <!-- ========= END OF CLASS DATA ========= --> <HR> <!-- ========== START OF NAVBAR ========== --> <A NAME="navbar_bottom"><!-- --></A> <TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0"> <TR> <TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A NAME="navbar_bottom_firstrow"><!-- --></A> <TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3"> <TR ALIGN="center" VALIGN="top"> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD> <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="class-use/P4Process.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD> </TR> </TABLE> </TD> <TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM> <a target="_top" href="http://www.perforce.com/"><img alt="Perforce" border="0" height="44" width="151" src="doc-files/perforce_logo.gif"></a></EM> </TD> </TR> <TR> <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> <A HREF="../../../com/perforce/api/P4JNI.html"><B>PREV CLASS</B></A> NEXT CLASS</FONT></TD> <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> <A HREF="../../../index.html" TARGET="_top"><B>FRAMES</B></A> <A HREF="P4Process.html" TARGET="_top"><B>NO FRAMES</B></A></FONT></TD> </TR> <TR> <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> SUMMARY: INNER | FIELD | <A HREF="#constructor_summary">CONSTR</A> | <A HREF="#method_summary">METHOD</A></FONT></TD> <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> DETAIL: FIELD | <A HREF="#constructor_detail">CONSTR</A> | <A HREF="#method_detail">METHOD</A></FONT></TD> </TR> </TABLE> <!-- =========== END OF NAVBAR =========== --> <HR> <i><a href="doc-files/LICENSE.TXT">Copyright</a> © 2001, Perforce Software, All rights reserved.</i> </BODY> </HTML>
# | Change | User | Description | Committed | |
---|---|---|---|---|---|
#1 | 5499 | Erik Schalburg | Initial branch | ||
//public/perforce/api/java/p4package/docs/com/perforce/api/P4Process.html | |||||
#6 | 2002 | David Markley | Integrated the latest changes for p4package to the public depot. | ||
#5 | 1808 | David Markley |
Updated Env class and fixed fstat issues. Published new Javadocs. |
||
#4 | 1361 | David Markley | Added convenience methods to the Env class. | ||
#3 | 1334 | David Markley |
Added more example code. Added the Counter class. Corrected the filelog methods for the FileEntry class. |
||
#2 | 1149 | David Markley | Added more documentation, a few examples, a cleanUp method, and a server timeout threshold. | ||
#1 | 1043 | David Markley | Initial branch to public area. | ||
//guest/david_markley/p4package/docs/com/perforce/api/P4Process.html | |||||
#2 | 1037 | David Markley | Updated the documentation. | ||
#1 | 1020 | David Markley |
Added Perforce Java API documentation. This is generated using JavaDoc. |