write huge text into clob column in oracle
varchar2 max character size is 32767 , that's why writing huge texts into column is problem. CLOB type is used for this, it can store 2,147,483,647 characters. But it is a bit problematic to write more than 32767 characters into CLOB typed column. For doing that either we should read from file or divide into small chunks. In example we will do this by chunks Firstly: package org.example; import java.io.*; import java.util.ArrayList; import java.util.List; public class FileChunker { private static final int CHUNK_SIZE = 21000; // Size of each chunk public static void main(String[] args) { String filePath = "/Users/bbb/Documents/aaa/new_license/license_en.html"; // Path to your file String outputDir = "/Users/bbb/Documents/aaa/new_license/chunks_en"; // Directory to save chunks try { List<String> chunks = splitFileIntoChunks (filePath); createFilesFromChunks (chunks, outputDir); System. out...