/*
* Read char
*/
Private String readtxt () throws IOException {
BufferedReader br = new BufferedReader (new FileReader ("d:/SQL .txt "));
String str = "";
String r = br. readLine ();
While (r! = Null ){
Str + = r;
R = br. readLine ();
}
Return str;
}
Java code
/*
* Read char
*/
Private String readtxt () throws IOException {
BufferedReader br = new BufferedReader (new FileReader ("d:/SQL .txt "));
String str = "";
String r = br. readLine ();
While (r! = Null ){
Str + = r;
R = br. readLine ();
}
Return str;
}
Java code
/*
* Read char
*/
Private String readtxt2 () throws IOException {
String str = "";
FileReader fr = new FileReader ("d:/SQL .txt ");
Char [] chars = new char [1024];
Int B = 0;
While (B = fr. read (chars ))! =-1 ){
Str + = String. valueOf (chars );
}
Return str;
}
Java code
/*
* Read char
*/
Private String readtxt2 () throws IOException {
String str = "";
FileReader fr = new FileReader ("d:/SQL .txt ");
Char [] chars = new char [1024];
Int B = 0;
While (B = fr. read (chars ))! =-1 ){
Str + = String. valueOf (chars );
}
Return str;
}
Java code
/*
* Read bytes
*/
Private Byte [] readtxt3 () throws IOException {
InputStream input = new FileInputStream ("d:/SQL .txt ");
Byte [] B = new byte [1024];
ArrayList <Byte> lsbytes = new ArrayList <Byte> ();
Int n = 0;
While (n = input. read (B ))! =-1 ){
For (int I = 0; I <n; I ++ ){
Lsbytes. add (B [I]);
}
}
Return (Byte []) (lsbytes. toArray ());
}
Java code
/*
* Read bytes
*/
Private Byte [] readtxt3 () throws IOException {
InputStream input = new FileInputStream ("d:/SQL .txt ");
Byte [] B = new byte [1024];
ArrayList <Byte> lsbytes = new ArrayList <Byte> ();
Int n = 0;
While (n = input. read (B ))! =-1 ){
For (int I = 0; I <n; I ++ ){
Lsbytes. add (B [I]);
}
}
Return (Byte []) (lsbytes. toArray ());
}