public class FileUDTValue extends ADEPT2UDTValue
FileUDTValue extends a UDTValue by file
support. A file may be specified via a FileUDTValue.FileDescriptor of which the
content is read and stored in this UDTValue. Please note that
this is only used for input parameters since all file information is lost as
soon as the UDTValue is stored. This is intended since only the
value is relevant in a process context, not where it stems from.| Modifier and Type | Class and Description |
|---|---|
static class |
FileUDTValue.FileDescriptor
Represents a file by its name as well as an optional charset which is used
to decode the bytes read from the file.
|
| Modifier and Type | Field and Description |
|---|---|
protected java.lang.String |
fileName
The name of the file this UDT stems from.
|
stream, userDefinedTypeName, value| Constructor and Description |
|---|
FileUDTValue(java.lang.String userDefinedType,
FileUDTValue.FileDescriptor fileDescriptor)
Creates a new
FileUDTValue with the designated user-defined
type name and the input of the file represented by the designated file
descriptor. |
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(java.lang.Object obj) |
protected static byte[] |
getContent(FileUDTValue.FileDescriptor fileDescriptor)
Reads the contents of the file represented by the designated file
descriptor.
|
int |
hashCode() |
java.lang.String |
toString() |
finalize, getUserDefinedType, getValueAsArray, getValueAsStream, readStreamprotected final java.lang.String fileName
public FileUDTValue(java.lang.String userDefinedType,
FileUDTValue.FileDescriptor fileDescriptor)
throws java.io.IOException
FileUDTValue with the designated user-defined
type name and the input of the file represented by the designated file
descriptor.userDefinedType - The name of the user-defined type of the value. the
name of the user defined typefileDescriptor - The file descriptor representing a file containing
the content for the UDTValue and the corresponding
character set.java.io.IOException - If the designated file can not be read, an
IOException will be thrown.java.lang.IllegalArgumentException - If the designated file descriptor does not
represent an existing file, an
IllegalArgumentException will be thrown.protected static byte[] getContent(FileUDTValue.FileDescriptor fileDescriptor) throws java.io.IOException
\n.fileDescriptor - The file descriptor representing a file of which the
content is to be read.java.io.IOException - If the designated file can not be read, an
IOException will be thrown.java.lang.IllegalArgumentException - If the designated file descriptor does not
represent an existing file, an
IllegalArgumentException will be thrown.public java.lang.String toString()
toString in class ADEPT2UDTValuepublic boolean equals(java.lang.Object obj)
equals in class ADEPT2UDTValuepublic int hashCode()
hashCode in class ADEPT2UDTValue