print the first sentence of each paragraph in Java
<p>I have a text file and wish to print the <strong><em>first</em></strong> sentence of each paragraph.  Paragraphs are separated by a line break, i.e. "\n".</p>

<p>From the BreakIterator, I thought I could use the getLineInstance() for this but it seems it is iterator over each word:</p>

<pre><code>public String[] extractFirstSentences() {
    BreakIterator boundary = BreakIterator.getLineInstance(Locale.US);
    boundary.setText(getText());

    List&lt;String&gt; sentences = new ArrayList&lt;String&gt;();
    int start = boundary.first();
    int end = boundary.next();
    while (end != BreakIterator.DONE) {
        String sentence = getText().substring(start, end).trim();
        if (!sentence.isEmpty()) {
            sentences.add(sentence);
        }
        start = end;
        end = boundary.next();
    }

    return sentences.toArray(new String[sentences.size()]);
</code></pre>

<p>Am I using getLineInstance() incorrectly or is there another method to do what I want?</p>
