Did you ever had a requirement where you have to stream the data from any other application into domino as HTML stream. Below code helps you writing a Java agent where you can stream the data and store the same into the notes documents and then finally show the document to the user. Or if the data is in plain text format. you could just print the same to a webpage.
Find the below method which will post the into a external URL.
public void doSubmit(String url , RichTextItem body , String ReportFormat ,String ReportCode) throws Exception {
URL siteUrl = new URL(url);
HttpURLConnection conn = (HttpURLConnection) siteUrl.openConnection();
conn.setRequestMethod("POST");
conn.setDoOutput(true);
conn.setDoInput(true);
DataOutputStream out = new DataOutputStream(conn.getOutputStream());
String content = "rc=" + ReportCode + "&key=keyvalue"
out.writeBytes(content);
out.flush();
out.close();
BufferedReader in = new BufferedReader(new InputStreamReader(conn.getInputStream()));
String line = "";
while((line=in.readLine())!=null) {
body.appendText(line);
}
in.close();
}