01e38acffe
10:29 PM peraturan bandar 1925 pdf download ini akan kami masukkan.
06:45 AM peraturan bandar 1925 pdf download..
And the java code I'm using to read the file is the following
import java.io.File;
import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.InputStream;
import java.io.OutputStream;
import java.io.UnsupportedEncodingException;
import java.net.URL;
import java.nio.charset.Charset;
import java.util.Scanner;
/**
*
* @author..
*/
public class ReadFile {
public void readFile(URL url) {
try {
Scanner input = new Scanner(url.openStream(), "UTF-8");
String line = input.nextLine();
//printString(line);
while (input.hasNext()) {
input.nextLine();
//System.out.println(line);
}
} catch (UnsupportedEncodingException e) {
e.printStackTrace();
} catch (Exception e) {
e.printStackTrace();
}
}
private void printString(String s) {
try {
byte[] bytes = s.getBytes("UTF-8");
System.out.println(new String(bytes, "UTF-8"));
Related links:
コメント