|
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectorg.jppf.io.AbstractDataLocation
org.jppf.io.FileDataLocation
public class FileDataLocation
Data location backed by a file.
| Field Summary |
|---|
| Fields inherited from class org.jppf.io.AbstractDataLocation |
|---|
size, transferring |
| Fields inherited from interface org.jppf.io.DataLocation |
|---|
UNKNOWN_SIZE |
| Constructor Summary | |
|---|---|
FileDataLocation(File file)
Initialize this file location with the specified file and unknown size. |
|
FileDataLocation(File file,
int size)
Initialize this file location with the specified file and size. |
|
FileDataLocation(String path)
Initialize this file location with the specified file path and an unknown size. |
|
FileDataLocation(String path,
int size)
Initialize this file location with the specified file path and size. |
|
| Method Summary | |
|---|---|
DataLocation |
copy()
Make a shallow copy of this data location. |
protected void |
finalize()
This method deletes the underlying file. |
InputStream |
getInputStream()
Get an input stream for this location. |
OutputStream |
getOutputStream()
Get an output stream for this location. |
int |
transferFrom(InputSource source,
boolean blocking)
Transfer the content of this data location from the specified input source. |
int |
transferTo(OutputDestination dest,
boolean blocking)
Transfer the content of this data location to the specified output destination. |
| Methods inherited from class org.jppf.io.AbstractDataLocation |
|---|
getSize, setSize |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public FileDataLocation(String path)
path - the path to the underlying file.
public FileDataLocation(String path,
int size)
path - the path to the underlying file.size - the size of the data represented by this file location.public FileDataLocation(File file)
file - an abstract path to the underlying file.
public FileDataLocation(File file,
int size)
file - an abstract path to the underlying file.size - the size of the data represented by this file location.| Method Detail |
|---|
public int transferFrom(InputSource source,
boolean blocking)
throws Exception
source - the input source to transfer from.blocking - if true, the method will block until the entire content has been transferred.
Exception - if an IO error occurs.DataLocation.transferFrom(org.jppf.io.InputSource, boolean)
public int transferTo(OutputDestination dest,
boolean blocking)
throws Exception
dest - the output destination to transfer to.blocking - if true, the method will block until the entire content has been transferred.
Exception - if an IO error occurs.DataLocation.transferTo(org.jppf.io.OutputDestination, boolean)
protected void finalize()
throws Throwable
finalize in class ObjectThrowable - if an error occurs.Object.finalize()
public InputStream getInputStream()
throws Exception
InputStream instance.
Exception - if an I/O error occurs.DataLocation.getInputStream()
public OutputStream getOutputStream()
throws Exception
OutputStream instance.
Exception - if an I/O error occurs.DataLocation.getOutputStream()public DataLocation copy()
DataLocation.copy()
|
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||