blob: 43b1eb246af749639263d08b8a6fbf4e3fede0d8 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
|
importPackage(java.io);
function writeFile( file, stream ) {
var buffer = new PrintWriter( new FileWriter( file ) );
buffer.print( stream );
buffer.close();
}
function read( file ) {
var jq = new File(file);
var reader = new BufferedReader(new FileReader(jq));
var line = null;
var buffer = new java.lang.StringBuffer(jq.length());
while( (line = reader.readLine()) != null) {
buffer.append(line);
buffer.append("\n");
}
return buffer.toString();
}
|