com.caucho.quercus.lib.file
Class PopenInput

java.lang.Object
  extended by java.io.InputStream
      extended by com.caucho.quercus.lib.file.ReadStreamInput
          extended by com.caucho.quercus.lib.file.PopenInput
All Implemented Interfaces:
EnvCleanup, BinaryInput, BinaryStream, java.io.Closeable

public class PopenInput
extends ReadStreamInput
implements EnvCleanup

Represents an input stream for a popen'ed process.


Field Summary
 
Fields inherited from interface com.caucho.quercus.lib.file.BinaryStream
SEEK_CUR, SEEK_END, SEEK_SET
 
Constructor Summary
PopenInput(Env env, java.lang.Process process)
           
 
Method Summary
 void cleanup()
          Implements the EnvCleanup interface.
 void close()
          Closes the file.
 long getLength()
          Returns the number of bytes available to be read, 0 if no known.
 BinaryInput openCopy()
          Opens a copy.
 int pclose()
           
 java.lang.String toString()
          Converts to a string.
 
Methods inherited from class com.caucho.quercus.lib.file.ReadStreamInput
appendTo, closeRead, getInputStream, getPosition, getResourceType, init, isEOF, read, read, read, read, readLine, readOptionalLinefeed, seek, setEncoding, setPosition, stat, toJavaObject, unread, writeToStream
 
Methods inherited from class java.io.InputStream
available, mark, markSupported, read, reset, skip
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

PopenInput

public PopenInput(Env env,
                  java.lang.Process process)
           throws java.io.IOException
Throws:
java.io.IOException
Method Detail

openCopy

public BinaryInput openCopy()
                     throws java.io.IOException
Opens a copy.

Specified by:
openCopy in interface BinaryInput
Overrides:
openCopy in class ReadStreamInput
Throws:
java.io.IOException

getLength

public long getLength()
Returns the number of bytes available to be read, 0 if no known.


toString

public java.lang.String toString()
Converts to a string.

Overrides:
toString in class ReadStreamInput

pclose

public int pclose()

close

public void close()
Description copied from class: ReadStreamInput
Closes the file.

Specified by:
close in interface BinaryInput
Specified by:
close in interface BinaryStream
Specified by:
close in interface java.io.Closeable
Overrides:
close in class ReadStreamInput

cleanup

public void cleanup()
Implements the EnvCleanup interface.

Specified by:
cleanup in interface EnvCleanup