Sunday, August 21, 2011

How to read data sources in eDiscovery

In addition to local files, FreeEed needs to read such resources as

http://
https://
ftp:// with user name and password


and so on. As it turns out, the regular Java URL classes do all that! Why it is not publicized by Oracle/SUN - I have no idea, but the following three lines are all that you need to read from anywhere on any network:

URL url = new URL(dir);
URLConnection con = url.openConnection();
BufferedInputStream in = new BufferedInputStream(con.getInputStream());


Hooray for Java, and FreeEed now has it - watch for the next release.

No comments: