public class FileContent extends Object
Constructor and Description |
---|
FileContent()
Create a new file data.
|
FileContent(File file)
Create new file data with content of a file.
|
FileContent(String filename,
byte[] data,
int size)
Create a new file data.
|
Modifier and Type | Method and Description |
---|---|
static FileContent |
createFragment(FileInputStream fis,
String filename,
int fragmentsize,
int size)
Create fragmented file content objects.
|
byte[] |
getData()
Get the data.
|
String |
getDataString()
Get the data as a transferable string.
|
String |
getFilename()
Get the filename.
|
int |
getSize()
Get the size.
|
void |
setDataString(String sdata)
Set the data.
|
void |
setFilename(String filename)
Set the filename.
|
void |
setSize(int size)
Set the size.
|
void |
writeFile(File file)
Write content to a file.
|
public FileContent()
public FileContent(String filename, byte[] data, int size)
public FileContent(File file)
public static FileContent createFragment(FileInputStream fis, String filename, int fragmentsize, int size)
public void writeFile(File file)
public String getDataString()
public byte[] getData()
public void setDataString(String sdata)
data
- The data to set.public String getFilename()
public void setFilename(String filename)
filename
- The filename to set.public int getSize()
public void setSize(int size)
size
- The size to set.Copyright © 2015. All Rights Reserved.