public static class FileUDTValue.FileDescriptor
extends java.lang.Object
implements java.io.Serializable
| Modifier and Type | Field and Description |
|---|---|
protected java.lang.String |
charset
The name of the character set to be used for decoding the bytes read from
the file.
|
protected java.lang.String |
fileName
The name of the file of this descriptor.
|
| Constructor and Description |
|---|
FileDescriptor(java.lang.String fileName,
boolean charContent)
Creates a new
FileDescriptor for the designated file which
may be other binary content or character content. |
FileDescriptor(java.lang.String fileName,
java.nio.charset.Charset charset)
Creates a new
FileDescriptor for the designated character
file with the designated character set for decoding the read bytes. |
| Modifier and Type | Method and Description |
|---|---|
boolean |
fileValid()
Returns whether this descriptor represents a valid file, that is whether
the file with the designated name really exists.
|
java.nio.charset.Charset |
getCharset()
Gets the character set to be used for decoding the bytes read from the
file this descriptor represents.
|
java.lang.String |
getFileName()
Gets the name of the file this descriptor represents.
|
java.lang.String |
toString() |
protected java.lang.String fileName
protected java.lang.String charset
public FileDescriptor(java.lang.String fileName,
boolean charContent)
FileDescriptor for 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
use #FileDescriptor(String, Charset).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.public FileDescriptor(java.lang.String fileName,
java.nio.charset.Charset charset)
FileDescriptor for the designated character
file with the designated character set for decoding the read bytes.fileName - The name of the file the created file descriptor
represents.charset - The character set to be used for decoding the read bytes.public java.lang.String getFileName()
public java.nio.charset.Charset getCharset()
public boolean fileValid()
public java.lang.String toString()
toString in class java.lang.Object