public class TempFileInput extends BinaryInput
| Modifier and Type | Field and Description |
|---|---|
static String |
_rcsid |
protected static int |
CHUNK_SIZE |
protected static int |
DEFAULT_MAX_MEM_SIZE |
protected File |
file |
protected byte[] |
inMemoryBuffer |
length, stream| Modifier | Constructor and Description |
|---|---|
protected |
TempFileInput() |
|
TempFileInput(File tempFile)
Construct from an existing temporary fle.
|
|
TempFileInput(InputStream is)
Construct from an input stream.
|
|
TempFileInput(InputStream is,
long length)
Construct from a length-delimited input stream.
|
|
TempFileInput(InputStream is,
long length,
int maxMemSize)
Construct from a length-delimited input stream.
|
| Modifier and Type | Method and Description |
|---|---|
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"
|
closeStream, doneWithStream, getLength, getStream, handleIOExceptionpublic static final String _rcsid
protected File file
protected byte[] inMemoryBuffer
protected static final int CHUNK_SIZE
protected static final int DEFAULT_MAX_MEM_SIZE
public TempFileInput(InputStream is) throws ManifoldCFException, IOException
is - is the input stream to use to construct the temporary file.ManifoldCFExceptionIOExceptionpublic TempFileInput(InputStream is, long length) throws ManifoldCFException, IOException
is - is the input stream.length - is the maximum number of bytes to transfer, or -1 if no limit.ManifoldCFExceptionIOExceptionpublic TempFileInput(InputStream is, long length, int maxMemSize) throws ManifoldCFException, IOException
is - is the input stream.length - is the maximum number of bytes to transfer, or -1 if no limit.maxMemSize - is the maximum bytes we keep in memory in lieu of using a file.ManifoldCFExceptionIOExceptionpublic TempFileInput(File tempFile)
tempFile - is the existing temporary file.protected TempFileInput()
public BinaryInput transfer()
transfer in class BinaryInputpublic void discard()
throws ManifoldCFException
BinaryInputdiscard in class BinaryInputManifoldCFExceptionprotected void openStream()
throws ManifoldCFException
openStream in class BinaryInputManifoldCFExceptionprotected void calculateLength()
throws ManifoldCFException
calculateLength in class BinaryInputManifoldCFException