public void convertToFileIfRequired() {
try {
if (small != null && small.length > getMaxLengthInplaceLob()) {
int len = getBufferSize(Long.MAX_VALUE);
int tabId = tableId;
if (type == Value.BLOB) {
createFromStream(
DataUtils.newBytes(len), 0, getInputStream(), Long.MAX_VALUE);
} else {
createFromReader(
new char[len], 0, getReader(), Long.MAX_VALUE);
}
Value v2 = link(tabId);
if (SysProperties.CHECK && v2 != this) {
DbException.throwInternalError();
}
}
} catch (IOException e) {
throw DbException.convertIOException(e, null);
}
}