*/
public PropertiesLexer(File in, Charset charset){
String str = new InputAdapter().asString(in,charset);
if(Properties.Factory.mode == Mode.Compatibility){
// first filter the entire input for unicode escapes
AsciiToNativeFilterReader reader = new AsciiToNativeFilterReader(new StringReader(str));
StringBuilder builder = new StringBuilder();
char [] array = new char[8120];
int count = 0;
try {
while((count = reader.read(array))!= -1) {
builder.append(array,0,count);
}
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();