public class TempFileDataSource extends AbstractDataSource
APPLICATION_OCTET_STREAM, APPLICATION_XML, CONTENT_TYPE, TEXT_HTML, TEXT_PLAIN| Constructor and Description |
|---|
TempFileDataSource(String type) |
TempFileDataSource(String prefix,
String suffix,
File parent,
String type) |
| Modifier and Type | Method and Description |
|---|---|
FileInputStream |
getInputStream() |
FileOutputStream |
getOutputStream() |
long |
length()
Method to get the number of bytes stored in
this
DataSource. |
getContentType, getName, setContentType, setNameclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitclear, getInputStream, getOutputStream, wrap, wrap, writeTo@ConstructorProperties(value={"","","","contentType"}) public TempFileDataSource(String prefix, String suffix, File parent, String type)
prefix - The file name prefix.suffix - The file name suffix.parent - The parent File.type - Initial "ContentType" attribute
value.File.createTempFile(String,String,File)@ConstructorProperties(value="contentType") public TempFileDataSource(String type)
type - Initial "ContentType" attribute
value.public long length()
DataSourceDefaultMethodsthis
DataSource; -1 if the count is unknown.public FileInputStream getInputStream() throws IOException
IOExceptionpublic FileOutputStream getOutputStream() throws IOException
IOExceptionCopyright © 2015–2021. All rights reserved.