public class FileContents extends Object
Modifier and Type | Field and Description |
---|---|
DataHandler |
fileData |
String |
name |
Constructor and Description |
---|
FileContents() |
Modifier and Type | Method and Description |
---|---|
void |
setFile(File file,
String contentType)
Initialize the contents of this descriptor from the given file and
content type.
|
void |
writeToFile(File file)
Write the content described by this class to the specified file.
|
public String name
public DataHandler fileData
public void setFile(File file, String contentType)
file
- The file that is to be reported.contentType
- The estimated content type of the file.public void writeToFile(File file) throws IOException, FilesystemAccessException
file
- The file to write to; must already exist.IOException
FilesystemAccessException
Copyright © 2015–2018 The Apache Software Foundation. All rights reserved.