<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <!--NewPage--> <HTML> <HEAD> <!-- Generated by javadoc (build 1.5.0_08) on Mon Jan 28 12:25:39 PST 2008 --> <TITLE> P4Process (Perforce API) </TITLE> <META NAME="keywords" CONTENT="com.perforce.api.P4Process class"> <LINK REL ="stylesheet" TYPE="text/css" HREF="../../../stylesheet.css" TITLE="Style"> <SCRIPT type="text/javascript"> function windowTitle() { parent.document.title="P4Process (Perforce API)"; } </SCRIPT> <NOSCRIPT> </NOSCRIPT> </HEAD> <BODY BGCOLOR="white" onload="windowTitle();"> <!-- ========= START OF TOP NAVBAR ======= --> <A NAME="navbar_top"><!-- --></A> <A HREF="#skip-navbar_top" 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_top_firstrow"><!-- --></A> <TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY=""> <TR ALIGN="center" VALIGN="top"> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../com/perforce/api/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" title="class in com.perforce.api"><B>PREV CLASS</B></A> <A HREF="../../../com/perforce/api/PerforceException.html" title="class in com.perforce.api"><B>NEXT CLASS</B></A></FONT></TD> <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> <A HREF="../../../index.html?com/perforce/api/P4Process.html" target="_top"><B>FRAMES</B></A> <A HREF="P4Process.html" target="_top"><B>NO FRAMES</B></A> <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: NESTED | 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> <A NAME="skip-navbar_top"></A> <!-- ========= END OF TOP 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/j2se/1.5.0/docs/api/java/lang/Object.html" title="class or interface in java.lang">java.lang.Object</A> <IMG SRC="../../../resources/inherit.gif" ALT="extended by "><B>com.perforce.api.P4Process</B> </PRE> <HR> <DL> <DT><PRE>public class <B>P4Process</B><DT>extends <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Object.html" title="class or interface in java.lang">Object</A></DL> </PRE> <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" title="class in com.perforce.api"><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> <P> <DL> <DT><B>Version:</B></DT> <DD>$Date: 2008/08/06 $ $Revision: #10 $</DD> <DT><B>Author:</B></DT> <DD><a href="mailto:david@markley.cc">David Markley</a>, <a href="mailto:srporeddy@yahoo.com">Sivananda Poreddy</a></DD> <DT><B>See Also:</B><DD><A HREF="../../../com/perforce/api/Env.html" title="class in com.perforce.api"><CODE>Env</CODE></A>, <A HREF="../../../com/perforce/api/SourceControlObject.html" title="class in com.perforce.api"><CODE>SourceControlObject</CODE></A>, <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Thread.html" title="class or interface in java.lang"><CODE>Thread</CODE></A></DL> <HR> <P> <!-- ======== CONSTRUCTOR SUMMARY ======== --> <A NAME="constructor_summary"><!-- --></A> <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> <TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2"> <B>Constructor Summary</B></FONT></TH> </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" title="class in com.perforce.api">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" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> <TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2"> <B>Method Summary</B></FONT></TH> </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/j2se/1.5.0/docs/api/java/io/PrintStream.html" title="class or interface in java.io">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/j2se/1.5.0/docs/api/java/lang/String.html" title="class or interface in java.lang">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" title="class in com.perforce.api">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" title="class in com.perforce.api">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/j2se/1.5.0/docs/api/java/lang/String.html" title="class or interface in java.lang">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/j2se/1.5.0/docs/api/java/lang/String.html" title="class or interface in java.lang">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/j2se/1.5.0/docs/api/java/lang/String.html" title="class or interface in java.lang">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" title="class in com.perforce.api">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" title="class in com.perforce.api">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" title="class in com.perforce.api">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/j2se/1.5.0/docs/api/java/lang/String.html" title="class or interface in java.lang">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" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> <TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor"> <TH ALIGN="left"><B>Methods inherited from class java.lang.<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Object.html" title="class or interface in java.lang">Object</A></B></TH> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD><CODE><A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Object.html#clone()" title="class or interface in java.lang">clone</A>, <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Object.html#equals(java.lang.Object)" title="class or interface in java.lang">equals</A>, <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Object.html#finalize()" title="class or interface in java.lang">finalize</A>, <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Object.html#getClass()" title="class or interface in java.lang">getClass</A>, <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Object.html#hashCode()" title="class or interface in java.lang">hashCode</A>, <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Object.html#notify()" title="class or interface in java.lang">notify</A>, <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Object.html#notifyAll()" title="class or interface in java.lang">notifyAll</A>, <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Object.html#wait()" title="class or interface in java.lang">wait</A>, <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Object.html#wait(long)" title="class or interface in java.lang">wait</A>, <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Object.html#wait(long, int)" title="class or interface in java.lang">wait</A></CODE></TD> </TR> </TABLE> <P> <!-- ========= 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="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. <P> <DL> <DT><B>See Also:</B><DD><A HREF="../../../com/perforce/api/P4Process.html#getBase()"><CODE>getBase()</CODE></A></DL> </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" title="class in com.perforce.api">Env</A> e)</PRE> <DL> <DD>Constructor that specifies the source control environment. <P> <DL> <DT><B>Parameters:</B><DD><CODE>e</CODE> - Source control environment to use.</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="close()"><!-- --></A><H3> close</H3> <PRE> public int <B>close</B>() throws <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/io/IOException.html" title="class or interface in java.io">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. <P> <DD><DL> <DT><B>Returns:</B><DD>The exit value of the underlying process. <DT><B>Throws:</B> <DD><CODE><A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/io/IOException.html" title="class or interface in java.io">IOException</A></CODE><DT><B>See Also:</B><DD><A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/System.html" title="class or interface in java.lang"><CODE>System</CODE></A></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/j2se/1.5.0/docs/api/java/io/PrintStream.html" title="class or interface in java.io">PrintStream</A> out) throws <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/io/IOException.html" title="class or interface in java.io">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. <P> <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. <DT><B>Throws:</B> <DD><CODE><A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/io/IOException.html" title="class or interface in java.io">IOException</A></CODE></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/j2se/1.5.0/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A>[] cmd) throws <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/io/IOException.html" title="class or interface in java.io">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. <P> <DD><DL> <DT><B>Parameters:</B><DD><CODE>cmd</CODE> - Array of command line arguments ("p4" must be first). <DT><B>Throws:</B> <DD><CODE><A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/io/IOException.html" title="class or interface in java.io">IOException</A></CODE></DL> </DD> </DL> <HR> <A NAME="flush()"><!-- --></A><H3> flush</H3> <PRE> public void <B>flush</B>() throws <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/io/IOException.html" title="class or interface in java.io">IOException</A></PRE> <DL> <DD>Flushes the output stream to the process. <P> <DD><DL> <DT><B>Throws:</B> <DD><CODE><A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/io/IOException.html" title="class or interface in java.io">IOException</A></CODE></DL> </DD> </DL> <HR> <A NAME="getBase()"><!-- --></A><H3> getBase</H3> <PRE> public static <A HREF="../../../com/perforce/api/P4Process.html" title="class in com.perforce.api">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" title="class in com.perforce.api"><CODE>source control environment</CODE></A>. <P> <DD><DL> <DT><B>Returns:</B><DD>Source control environment.<DT><B>See Also:</B><DD><A HREF="../../../com/perforce/api/Env.html" title="class in com.perforce.api"><CODE>Env</CODE></A></DL> </DD> </DL> <HR> <A NAME="getEnv()"><!-- --></A><H3> getEnv</H3> <PRE> public <A HREF="../../../com/perforce/api/Env.html" title="class in com.perforce.api">Env</A> <B>getEnv</B>()</PRE> <DL> <DD>Returns the environment in use by this process. <P> <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. <P> <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. <P> <DD><DL> </DL> </DD> </DL> <HR> <A NAME="getServerTimeout()"><!-- --></A><H3> getServerTimeout</H3> <PRE> public long <B>getServerTimeout</B>()</PRE> <DL> <DD>Return the server timeout threshold. <P> <DD><DL> </DL> </DD> </DL> <HR> <A NAME="outClose()"><!-- --></A><H3> outClose</H3> <PRE> public void <B>outClose</B>() throws <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/io/IOException.html" title="class or interface in java.io">IOException</A></PRE> <DL> <DD>Flushes and closes the output stream to the process. <P> <DD><DL> <DT><B>Throws:</B> <DD><CODE><A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/io/IOException.html" title="class or interface in java.io">IOException</A></CODE></DL> </DD> </DL> <HR> <A NAME="print(java.lang.String)"><!-- --></A><H3> print</H3> <PRE> public void <B>print</B>(<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> line) throws <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/io/IOException.html" title="class or interface in java.io">IOException</A></PRE> <DL> <DD>Writes <code>line</code> to the standard input of the process. <P> <DD><DL> <DT><B>Parameters:</B><DD><CODE>line</CODE> - Line to be written. <DT><B>Throws:</B> <DD><CODE><A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/io/IOException.html" title="class or interface in java.io">IOException</A></CODE></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/j2se/1.5.0/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> line) throws <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/io/IOException.html" title="class or interface in java.io">IOException</A></PRE> <DL> <DD>Writes <code>line</code> to the standard input of the process. A newline is appended to the output. <P> <DD><DL> <DT><B>Parameters:</B><DD><CODE>line</CODE> - Line to be written. <DT><B>Throws:</B> <DD><CODE><A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/io/IOException.html" title="class or interface in java.io">IOException</A></CODE></DL> </DD> </DL> <HR> <A NAME="readLine()"><!-- --></A><H3> readLine</H3> <PRE> public <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> <B>readLine</B>()</PRE> <DL> <DD>Returns the next line from the process, or null if the command has completed its execution. <P> <DD><DL> </DL> </DD> </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" title="class in com.perforce.api">P4Process</A> b)</PRE> <DL> <DD>Sets the base process to be used when new processes are instantiated. <P> <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" title="class in com.perforce.api">Env</A> e)</PRE> <DL> <DD>Sets the environment to use. <P> <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" title="class in com.perforce.api">EventLog</A> log)</PRE> <DL> <DD>Sets the event log. Any events that should be logged will be logged through the EventLog specified here. <P> <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. <P> <DD><DL> </DL> </DD> </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. <P> <DD><DL> </DL> </DD> </DL> <HR> <A NAME="toString()"><!-- --></A><H3> toString</H3> <PRE> public <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> <B>toString</B>()</PRE> <DL> <DD><DL> <DT><B>Overrides:</B><DD><CODE><A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Object.html#toString()" title="class or interface in java.lang">toString</A></CODE> in class <CODE><A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Object.html" title="class or interface in java.lang">Object</A></CODE></DL> </DD> <DD><DL> </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="../../../com/perforce/api/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" title="class in com.perforce.api"><B>PREV CLASS</B></A> <A HREF="../../../com/perforce/api/PerforceException.html" title="class in com.perforce.api"><B>NEXT CLASS</B></A></FONT></TD> <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> <A HREF="../../../index.html?com/perforce/api/P4Process.html" target="_top"><B>FRAMES</B></A> <A HREF="P4Process.html" target="_top"><B>NO FRAMES</B></A> <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: NESTED | 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> <A NAME="skip-navbar_bottom"></A> <!-- ======== END OF BOTTOM NAVBAR ======= --> <HR> <i><a href="doc-files/LICENSE.TXT">Copyright</a> © 2008, Perforce Software, All rights reserved.</i> </BODY> </HTML>
# | Change | User | Description | Committed | |
---|---|---|---|---|---|
#11 | 8157 | michael | Archiving legacy java api projects which predate the supported P4Java api. | ||
#10 | 6433 | Sivananda Poreddy | Changing the communication preferences, and some documentation updates | ||
#9 | 6166 | Sivananda Poreddy | Fixing problem with last check related to javadoc | ||
#8 | 6164 | Sivananda Poreddy | Updating the javadoc to include all the new changes | ||
#7 | 6141 | Sivananda Poreddy | Updating the p4package with fixes, some new features, jar update, and doc updates | ||
#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. |