@Deprecated public class TempFileDataSource extends FileDataSource
Since this may cause problems if the getInputStream()
is called more than once, the file deletion is disabled if
that happens. Instead the File.deleteOnExit()
is
called to mark the file for deletion when the virtual machine exits.
Modifier and Type | Class and Description |
---|---|
private class |
TempFileDataSource.TempInputStream
Deprecated.
An InputStream implementation that deletes the source file
once the entire stream has been read (=any of the read()
methods return -1) or when close() is called.
|
Modifier and Type | Field and Description |
---|---|
private String |
mimeType
Deprecated.
|
private int |
numStreams
Deprecated.
|
Constructor and Description |
---|
TempFileDataSource(File file,
String mimeType)
Deprecated.
|
Modifier and Type | Method and Description |
---|---|
String |
getContentType()
Deprecated.
Get the supplied MIME type, if any.
|
InputStream |
getInputStream()
Deprecated.
Get an InputStream that deletes the source file as soon
as the end of file is reached or close() is called.
|
getFile, getName, getOutputStream, setFileTypeMap
private final String mimeType
private int numStreams
public String getContentType()
getContentType
in interface DataSource
getContentType
in class FileDataSource
public InputStream getInputStream() throws IOException
getInputStream
in interface DataSource
getInputStream
in class FileDataSource
IOException