|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.apache.manifoldcf.core.interfaces.BinaryInput
org.apache.manifoldcf.core.interfaces.TempFileInput
public class TempFileInput
This class represents a temporary file data input stream. Call the "done" method to clean up the file when done. NOTE: The implied flow of this method is to be handled a file that has already been created by some means. The file must be a dedicated temporary file, which can be destroyed when the data has been used.
| Field Summary | |
|---|---|
static java.lang.String |
_rcsid
|
protected static int |
CHUNK_SIZE
|
protected java.io.File |
file
|
| Fields inherited from class org.apache.manifoldcf.core.interfaces.BinaryInput |
|---|
length, stream |
| Constructor Summary | |
|---|---|
protected |
TempFileInput()
|
|
TempFileInput(java.io.File tempFile)
Construct from an existing temporary fle. |
|
TempFileInput(java.io.InputStream is)
Construct from an input stream. |
|
TempFileInput(java.io.InputStream is,
long length)
Construct from a length-delimited input stream. |
| Method Summary | |
|---|---|
protected void |
calculateLength()
|
void |
discard()
Discard the object |
protected void |
openStream()
|
BinaryInput |
transfer()
Transfer to a new object; this causes the current object to become "already discarded" |
| Methods inherited from class org.apache.manifoldcf.core.interfaces.BinaryInput |
|---|
closeStream, doneWithStream, getLength, getStream |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final java.lang.String _rcsid
protected java.io.File file
protected static final int CHUNK_SIZE
| Constructor Detail |
|---|
public TempFileInput(java.io.InputStream is)
throws ManifoldCFException
is - is the input stream to use to construct the temporary file.
ManifoldCFException
public TempFileInput(java.io.InputStream is,
long length)
throws ManifoldCFException
is - is the input stream.length - is the maximum number of bytes to transfer, or -1 if no limit.
ManifoldCFExceptionpublic TempFileInput(java.io.File tempFile)
tempFile - is the existing temporary file.protected TempFileInput()
| Method Detail |
|---|
public BinaryInput transfer()
transfer in class BinaryInput
public void discard()
throws ManifoldCFException
BinaryInput
discard in class BinaryInputManifoldCFException
protected void openStream()
throws ManifoldCFException
openStream in class BinaryInputManifoldCFException
protected void calculateLength()
throws ManifoldCFException
calculateLength in class BinaryInputManifoldCFException
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||