private boolean readPlainTextFile(final String uri) throws IOException {
		if (uri == null)
			return false;
		Reader reader = null;
		if (FileUtilities.isRemote(uri)) {
			URL u = null;
			try {
				u = new URL(FileUtilities.httpEncode(uri));
			} catch (MalformedURLException ex) {
				ex.printStackTrace();
				return false;
			}
			URLConnection conn = ConnectionManager.getConnection(u);
			if (conn == null)
				return false;
			try {
				reader = new InputStreamReader(conn.getInputStream());
			} catch (IOException e) {
				throw new IOException(e.getMessage());
			}
		} else {
			try {
				reader = new FileReader(new File(uri));
			} catch (IOException e) {
				throw new IOException(e.getMessage());
			}
		}
		final boolean b = isEditable();
		if (!b)
			setEditable(true);
		notifyPageListeners(new PageEvent(this, PageEvent.PAGE_READ_BEGIN));
		char[] c = new char[1024];
		int cpos = getCaretPosition();
		int n = 0;
		boolean success = true;
		try {
			while ((n = reader.read(c)) != -1) {
				getDocument().insertString(cpos, new String(c, 0, n), null);
				cpos += n;
			}
		} catch (BadLocationException e) {
			e.printStackTrace();
			success = false;
		} catch (IOException e) {
			success = false;
			throw new IOException(e.getMessage()); // rethrow
		} finally {
			reader.close();
		}
		EventQueue.invokeLater(new Runnable() {
			public void run() {
				setCaretPosition(0);
				setTitle(uri);
				if (!b)
					setEditable(false);
				notifyPageListeners(new PageEvent(Page.this, PageEvent.PAGE_READ_END));
			}
		});
		return success;
	}