public class SourceLobFile extends LobCopyInput
| Modifier and Type | Field and Description |
|---|---|
private java.lang.String |
myFile
The name of the actual file.
|
private boolean |
opened
Marks the attempt to open the stream was performed.
|
private Stream |
stream
File stream for input file, which is a remote resource
|
offsetTYPE_BLOB, TYPE_CHAR_BIT, TYPE_CLOB, TYPE_FIELD_BIT, TYPE_FILE, TYPE_LONGCHAR, TYPE_MEMPTR, TYPE_UNKNOWN| Constructor and Description |
|---|
SourceLobFile(character filename)
Constructor which accepts a filename.
|
SourceLobFile(java.lang.String filename)
Constructor which accepts a filename.
|
| Modifier and Type | Method and Description |
|---|---|
java.lang.String |
getFileName()
Obtain the name of the file.
|
private static java.lang.String |
getFilename(character filename)
Extract the filename from the given parameter.
|
int |
getObjectType()
Obtain the type of the object wrapped by this parameter
|
protected int |
getSize()
Get the size of the object to be copied.
|
private boolean |
openStream()
Opens the stream if not already open.
|
byte[] |
readBytes()
Read a specific number of bytes from the file, starting at this parameter's offset.
|
java.lang.String |
readString(java.lang.String codePage)
Read a specific number of characters from the file, starting at this parameter's offset.
|
boolean |
validateOffset(int targetType)
Checks if the optional offset is valid.
|
getLength, getOffset, length, length, offset, offset, validateclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetCodePage, isCharacterData, isLargeObjectprivate Stream stream
private boolean opened
stream != null.private final java.lang.String myFile
public SourceLobFile(java.lang.String filename)
filename - Name of file from which to copy.public SourceLobFile(character filename)
filename - Name of file from which to copy. Must not be unknown.public int getObjectType()
LobCopyParameter.TYPE_FILE.public java.lang.String readString(java.lang.String codePage)
readString in class LobCopyInputcodePage - Name of the character set to be used to encode the read string. If null,
the default charset will be used.public byte[] readBytes()
readBytes in class LobCopyInputpublic java.lang.String getFileName()
public boolean validateOffset(int targetType)
targetType - The type of the target object. The error messages are different in some cases (ignored?).true if the optional offset is valid.protected int getSize()
getSize in class LobCopyInputprivate boolean openStream()
true if the stream can be used (ie. stream != null).private static java.lang.String getFilename(character filename)
filename - File name.