Here you can find the source of loadClob(File f, String enc)
public static char[] loadClob(File f, String enc) throws Exception
//package com.java2s; //License from project: Apache License import java.io.BufferedReader; import java.io.File; import java.io.FileInputStream; import java.io.InputStreamReader; public class Main { public static char[] loadClob(File f, String enc) throws Exception { char[] data = null; BufferedReader br = new BufferedReader(new InputStreamReader(new FileInputStream(f), enc)); char[] tmp = new char[4096]; int num = 0; try {/*from www . ja v a 2 s. c o m*/ while ((num = br.read(tmp)) > 0) { if (data == null) { data = new char[num]; System.arraycopy(tmp, 0, data, 0, num); } else { char[] old = data; data = new char[old.length + num]; System.arraycopy(old, 0, data, 0, old.length); System.arraycopy(tmp, 0, data, old.length, num); } } } finally { br.close(); } return data; } }