}
public List<NodeImpl> createTokens(byte [] bytes) throws Exception {
if(charset != null) {
char [] chars = CharsDecoder.decode(charset, bytes, 0, bytes.length);
if(decode) chars = new RefsDecoder().decode(chars);
return createTokens(chars);
}
this.charset = detectCharset(bytes);
char [] chars = CharsDecoder.decode(charset, bytes, 0, bytes.length);
if(decode) chars = new RefsDecoder().decode(chars);
return createTokens(chars);
}