|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectedu.rit.pj.io.StreamFile
public class StreamFile
Class StreamFile represents a file that resides in the user's account in the job frontend process of a PJ cluster parallel program. Operations are provided to open an input stream or an output stream to read or write the file in the frontend processor.
| Constructor Summary | |
|---|---|
StreamFile(File theFile)
Construct a new stream file that refers to the given file in the frontend processor. |
|
| Method Summary | |
|---|---|
boolean |
equals(Object obj)
Determine if this stream file is equal to the given object. |
File |
getFile()
Obtain the file in the frontend processor to which this stream file refers. |
InputStream |
getInputStream()
Open an input stream for reading this stream file. |
OutputStream |
getOutputStream()
Open an output stream for writing this stream file. |
OutputStream |
getOutputStream(boolean append)
Open an output stream for writing this stream file. |
int |
hashCode()
Returns a hash code for this stream file. |
String |
toString()
Returns a string version of this stream file. |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public StreamFile(File theFile)
theFile - File.
NullPointerException - (unchecked exception) Thrown if theFile is null.| Method Detail |
|---|
public File getFile()
public OutputStream getOutputStream()
throws IOException
When called from a job backend process in a cluster parallel program, the returned output stream communicates with the job frontend process to write the file in the frontend processor. Otherwise, the returned output stream is a normal file output stream to write the file directly.
Note: The returned output stream does not do any buffering. Each method call sends a message to and receives a message from the job frontend. Consider layering a BufferedOutputStream on top of the returned output stream.
IOException - Thrown if an I/O error occurred.
public OutputStream getOutputStream(boolean append)
throws IOException
When called from a job backend process in a cluster parallel program, the returned output stream communicates with the job frontend process to write the file in the frontend processor. Otherwise, the returned output stream is a normal file output stream to write the file directly.
Note: The returned output stream does not do any buffering. Each method call sends a message to and receives a message from the job frontend. Consider layering a BufferedOutputStream on top of the returned output stream.
append - True to append, false to overwrite.
IOException - Thrown if an I/O error occurred.
public InputStream getInputStream()
throws IOException
When called from a job backend process in a cluster parallel program, the returned input stream communicates with the job frontend process to read the file in the frontend processor. Otherwise, the returned input stream is a normal file input stream to read the file directly.
Note: The returned input stream does not do any buffering. Each method call sends a message to and receives a message from the job frontend. Consider layering a BufferedInputStream on top of the returned input stream.
IOException - Thrown if an I/O error occurred.public boolean equals(Object obj)
equals in class Objectobj - Object to test.
public int hashCode()
hashCode in class Objectpublic String toString()
toString in class Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||