public void addFromStream(InputStream is) throws IOException
    {
        if (is.available() > 0)
        {
            BufferedReader reader = new BufferedReader(new InputStreamReader(is));
            String line;

            while ((line = reader.readLine()) != null)
            {
                if (line.length() > 0)
                    add(line.trim());
            }

            reader.close();
        }
    }