public FileReader(Client client, String path) {
super(getInputStream(client, path), charset.newDecoder());
}
private static InputStream getInputStream(Client client, String path) {
Module builtin = client.getModule("__builtin__");
PushyObject open = (PushyObject)builtin.__getattr__("open");
PushyObject file =
(PushyObject)open.__call__(new String[]{path, "r"});
return new FileInputStream(file);
}