22 package com.mysql.clusterj.jdbc.antlr;
24 import java.io.IOException;
26 import java.io.InputStreamReader;
27 import java.io.FileInputStream;
37 transient private String fileName;
44 this.fileName = fileName;
45 load(fileName, encoding);
48 private void load(
final String fileName,
final String encoding)
51 if ( fileName==null ) {
54 final File f =
new File(fileName);
55 final int size = (int)f.length();
56 InputStreamReader isr;
57 final FileInputStream fis =
new FileInputStream(fileName);
58 if ( encoding!=null ) {
59 isr =
new InputStreamReader(fis, encoding);
62 isr =
new InputStreamReader(fis);
65 data =
new char[
size];
66 super.n = isr.read(data);
73 public String getSourceName() {