public int length() {
long result;
try {
result = ClobType.this.length();
} catch (SQLException err) {
throw new TeiidRuntimeException(err);
}
if (((int)result) != result) {
throw new TeiidRuntimeException("Clob value is not representable by CharSequence"); //$NON-NLS-1$
}
return (int)result;
}
public char charAt(int index) {
try {
if (buffer == null || index < beginPosition || index >= beginPosition + buffer.length()) {
buffer = ClobType.this.getSubString(index + 1, CHAR_SEQUENCE_BUFFER_SIZE);
beginPosition = index;
}
return buffer.charAt(index - beginPosition);
} catch (SQLException err) {
throw new TeiidRuntimeException(err);
}
}
public CharSequence subSequence(int start,
int end) {
try {
return ClobType.this.getSubString(start + 1, end - start);
} catch (SQLException err) {
throw new TeiidRuntimeException(err);
}
}
};
}