Class FileUDTValue.FileDescriptor
java.lang.Object
de.aristaflow.adept2.model.datamanagement.FileUDTValue.FileDescriptor
- All Implemented Interfaces:
Serializable
- Enclosing class:
- FileUDTValue
Represents a file by its name as well as an optional charset which is used
to decode the bytes read from the file.
- See Also:
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionFileDescriptor(String fileName, boolean charContent) Creates a newFileDescriptorfor the designated file which may be other binary content or character content.FileDescriptor(String fileName, Charset charset) Creates a newFileDescriptorfor the designated character file with the designated character set for decoding the read bytes. -
Method Summary
Modifier and TypeMethodDescriptionbooleanReturns whether this descriptor represents a valid file, that is whether the file with the designated name really exists.Gets the character set to be used for decoding the bytes read from the file this descriptor represents.Gets the name of the file this descriptor represents.toString()
-
Field Details
-
fileName
The name of the file of this descriptor. -
charset
The name of the character set to be used for decoding the bytes read from the file.
-
-
Constructor Details
-
FileDescriptor
Creates a newFileDescriptorfor the designated file which may be other binary content or character content. If it is character content, UTF-8 will be used for decoding. If you need another decoding useFileDescriptor(String, Charset).- Parameters:
fileName- The name of the file the created file descriptor represents.charContent- Whether the content of the file is to be interpreted as characters with UTF-8 character set.
-
FileDescriptor
Creates a newFileDescriptorfor the designated character file with the designated character set for decoding the read bytes.- Parameters:
fileName- The name of the file the created file descriptor represents.charset- The character set to be used for decoding the read bytes.
-
-
Method Details
-
getFileName
Gets the name of the file this descriptor represents.- Returns:
- The name of the file this descriptor represents.
-
getCharset
Gets the character set to be used for decoding the bytes read from the file this descriptor represents. This will be null in case the file is not a character file.- Returns:
- The character set to be used for decoding the bytes read from the file this descriptor represents or null in case of a non-character file.
-
fileValid
public boolean fileValid()Returns whether this descriptor represents a valid file, that is whether the file with the designated name really exists.- Returns:
- Whether this descriptor represents a valid file, that is whether the file with the designated name really exists.
-
toString
-