code: public static void main(String[] args) throws IOException {
      if (args.length == 0) {
        System.err.print("Usage java opennlp.tools.lang.spanish.SentenceDetector model < text");
        System.exit(1);
      }
      SentenceDetectorME sdetector = new SentenceDetector(args[0]);
      StringBuffer para = new StringBuffer();
      BufferedReader inReader = new BufferedReader(new InputStreamReader(System.in,"ISO-8859-1"));
      PrintStream out = new PrintStream(System.out,true,"ISO-8859-1");
      for (String line = inReader.readLine(); line != null; line = inReader.readLine()) {
        if (line.equals("")) {
          if (para.length() != 0) {
            //System.err.println(para.toString());
            String[] sents = sdetector.sentDetect(para.toString());
            for (int si = 0, sn = sents.length; si < sn; si++) {
              out.println(sents[si]);
            }
          }
          out.println();
          para.setLength(0);
        }
        else {
          para.append(line).append(" ");
        }
      }
      if (para.length() != 0) {
        String[] sents = sdetector.sentDetect(para.toString());
        for (int si = 0, sn = sents.length; si < sn; si++) {
          out.println(sents[si]);
        }
      }
    }
docs: Perform sentence detection the input stream.  A blank line will be treated as a paragraph boundry.
  <p>java opennlp.tools.lang.spanish.SentenceDetector model < "First sentence. Second sentence? Here is another one. And so on and so forth - you get the idea."