Package org.cdlib.mrt.core
Class FileContent
java.lang.Object
org.cdlib.mrt.core.FileContent
- All Implemented Interfaces:
FileContentInf
Returns both File and File state information
- Author:
- dloy
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Stringprotected Fileprotected FileComponentprotected Stringprotected InputStreamprotected static final String -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedFileContent(File file, String checksumType, LoggerInf logger) Constructor that validates passed argumentsprotectedFileContent(FileComponent fileState, InputStream inputStream, File file) Constructore -
Method Summary
Modifier and TypeMethodDescriptionprotected voidBuild FileState information from filegetFile()Requested FileGet File State informationstatic FileContentgetFileContent(File file, String checksumType, LoggerInf logger) Factory class for FileContent when FileState does not existstatic FileContentgetFileContent(File file, LoggerInf logger) Factory class for FileContent when FileState does not existstatic FileContentgetFileContent(FileComponent fileState, InputStream inputStream, File file) Factory class to return FileContentFile disposition for this passed fileGet InputStream for returned filevoidSet FilevoidsetFileDisposition(String fileDisposition) voidsetFileState(FileComponent fileState) Set FileState valuevoidsetInputStream(InputStream inputStream) Set InputStream
-
Field Details
-
fileContent
-
inputStream
-
file
-
fileDisposition
-
DEFAULT_CHECKSUMTYPE
- See Also:
-
NL
-
-
Constructor Details
-
FileContent
Constructore- Parameters:
fileState- FileState data for objectinputStream- input stream to response datafile- Response file
-
FileContent
Constructor that validates passed arguments- Parameters:
file- response filelogger- process logger
-
-
Method Details
-
getFileDisposition
Description copied from interface:FileContentInfFile disposition for this passed file- Specified by:
getFileDispositionin interfaceFileContentInf- Returns:
- File disposition;
-
setFileDisposition
-
getFileContent
public static FileContent getFileContent(FileComponent fileState, InputStream inputStream, File file) Factory class to return FileContent- Parameters:
fileState- FileState data for objectinputStream- input stream to response datafile- Response file- Returns:
- Created FileContent object
-
getFileContent
Factory class for FileContent when FileState does not exist- Parameters:
file- response filelogger- process logger- Returns:
- FileContent object containing File and FileState
-
getFileContent
Factory class for FileContent when FileState does not exist- Parameters:
file- response filelogger- process logger- Returns:
- FileContent object containing File and FileState
-
getFileComponent
Description copied from interface:FileContentInfGet File State information- Specified by:
getFileComponentin interfaceFileContentInf- Returns:
- File State information
-
setFileState
Set FileState value- Parameters:
fileState- set using this FileState
-
getFile
Description copied from interface:FileContentInfRequested File- Specified by:
getFilein interfaceFileContentInf- Returns:
- Requested File
-
setFile
Set File- Parameters:
file- set using this File
-
getInputStream
Description copied from interface:FileContentInfGet InputStream for returned file- Specified by:
getInputStreamin interfaceFileContentInf- Returns:
- File InputStream
-
setInputStream
Set InputStream- Parameters:
inputStream- set using this InputStream
-
addFile
Build FileState information from file- Parameters:
file- response filelogger- process logger
-
dump
-