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, handleIOException
public 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.ManifoldCFException
IOException
public 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.ManifoldCFException
IOException
public 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.ManifoldCFException
IOException
public TempFileInput(File tempFile)
tempFile
- is the existing temporary file.protected TempFileInput()
public BinaryInput transfer()
transfer
in class BinaryInput
public void discard() throws ManifoldCFException
BinaryInput
discard
in class BinaryInput
ManifoldCFException
protected void openStream() throws ManifoldCFException
openStream
in class BinaryInput
ManifoldCFException
protected void calculateLength() throws ManifoldCFException
calculateLength
in class BinaryInput
ManifoldCFException