implementation 'com.squareup.okio:okio:2.10.0'
public void readLargeFile(String filePath) throws IOException {
File file = new File(filePath);
BufferedSource source = Okio.buffer(Okio.source(file));
String line;
while ((line = source.readUtf8Line()) != null) {
System.out.println(line);
}
source.close();
}
public void writeLargeFile(String filePath, String content) throws IOException {
File file = new File(filePath);
BufferedSink sink = Okio.buffer(Okio.sink(file));
sink.writeUtf8(content);
sink.close();
}
public void configBufferSize(String filePath) throws IOException {
File file = new File(filePath);
source.close();
}