|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.apache.manifoldcf.core.interfaces.CharacterInput
org.apache.manifoldcf.core.interfaces.TempFileCharacterInput
public class TempFileCharacterInput
This class represents a temporary file character 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.CharacterInput |
|---|
charLength, hashValue, stream |
| Constructor Summary | |
|---|---|
protected |
TempFileCharacterInput()
|
|
TempFileCharacterInput(java.io.File tempFile)
Construct from an existing temporary fle. |
|
TempFileCharacterInput(java.io.Reader is)
Construct from a length-delimited reader. |
| Method Summary | |
|---|---|
protected void |
calculateHashValue()
Calculate the datum's hash value |
protected void |
calculateLength()
Calculate the datum's length in characters |
void |
discard()
Discard this object permanently |
java.io.InputStream |
getUtf8Stream()
Open a Utf8 stream directly from the backing file |
protected void |
openStream()
Open a reader, for use by a caller, until closeStream is called |
CharacterInput |
transfer()
Transfer to a new object; this causes the current object to become "already discarded" |
| Methods inherited from class org.apache.manifoldcf.core.interfaces.CharacterInput |
|---|
closeStream, doneWithStream, getCharacterLength, getHashValue, 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 TempFileCharacterInput(java.io.Reader is)
throws ManifoldCFException
is - is a reader to transfer from, to the end of the data. This will, as a side effect, also calculate the character length
and hash value for the data.
ManifoldCFExceptionpublic TempFileCharacterInput(java.io.File tempFile)
tempFile - is the existing temporary file, encoded in utf-8.protected TempFileCharacterInput()
| Method Detail |
|---|
public java.io.InputStream getUtf8Stream()
throws ManifoldCFException
getUtf8Stream in class CharacterInputManifoldCFException
protected void openStream()
throws ManifoldCFException
CharacterInput
openStream in class CharacterInputManifoldCFExceptionpublic CharacterInput transfer()
transfer in class CharacterInput
public void discard()
throws ManifoldCFException
CharacterInput
discard in class CharacterInputManifoldCFException
protected void calculateLength()
throws ManifoldCFException
calculateLength in class CharacterInputManifoldCFException
protected void calculateHashValue()
throws ManifoldCFException
calculateHashValue in class CharacterInputManifoldCFException
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||