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 |
---|---|
protected void |
finalize() |
FileInputStream |
getInputStream() |
FileOutputStream |
getOutputStream() |
long |
length()
Method to get the number of bytes stored in
this
DataSource . |
getContentType, getName, setContentType, setName
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
clear, 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()
DataSourceDefaultMethods
this
DataSource
; -1
if the count is unknown.public FileInputStream getInputStream() throws IOException
IOException
public FileOutputStream getOutputStream() throws IOException
IOException
Copyright © 2015–2020 Allen D. Ball. All rights reserved.