Java將檔案讀入字串
如何在 java 中將文件內容讀入字串。
import org.apache.commons.io.IOUtils;
String s = IOUtils.toString(new FileInputStream("/tmp/file"));
See Apache Commons IO for more.
如何在 java 中將文件內容讀入字串。
import org.apache.commons.io.IOUtils;
String s = IOUtils.toString(new FileInputStream("/tmp/file"));
See Apache Commons IO for more.