public class DigestDataFile extends DataFile
Constructor and Description |
---|
DigestDataFile(String fileName,
DigestAlgorithm digestAlgorithm,
byte[] digest,
String mimeType)
Creates digest based data file.
|
Modifier and Type | Method and Description |
---|---|
String |
getContentType() |
long |
getFileSize()
Returns the data file size.
|
boolean |
isFileEmpty()
Returns
true if the data file size is 0 bytes. |
void |
setContentType(String contentType) |
calculateDigest, calculateDigest, calculateDigest, getBytes, getDocument, getId, getMediaType, getName, getStream, saveAs, saveAs, setDocument, setId, setMediaType
public DigestDataFile(String fileName, DigestAlgorithm digestAlgorithm, byte[] digest, String mimeType)
fileName
- name of the filedigestAlgorithm
- algorithm of the digestdigest
- digest of the file contentsmimeType
- mime-type of the data file, for example 'text/plain' or 'application/msword'public String getContentType()
public void setContentType(String contentType)
public long getFileSize()
DataFile
getFileSize
in class DataFile
public boolean isFileEmpty()
DataFile
true
if the data file size is 0 bytes.isFileEmpty
in class DataFile
true
if the data file is emptyCopyright © 2024. All rights reserved.