Skip to Main Content
IBM Workplace Forms: Guide to Building and Integrating a Sample Workplace Forms Application
book

IBM Workplace Forms: Guide to Building and Integrating a Sample Workplace Forms Application

by Bernd Beilke, Cayce Marston, Kioko Mwosa, George Poirier, Andreas A. Richter, Deanna Drschiwiski, John Bergland, Yves Bollanga
July 2006
Intermediate to advanced content levelIntermediate to advanced
356 pages
10h 31m
English
IBM Redbooks
Content preview from IBM Workplace Forms: Guide to Building and Integrating a Sample Workplace Forms Application
Chapter 9. Domino integration 323
byte[] b = new byte[2048];
byte[] bEnd;
int numberOfBytesRead = 0;
while ((numberOfBytesRead = servletin.read(b, 0, b.length)) != -1) {
if (numberOfBytesRead != 2048) {//last part of the message -
// truncate the buffe after end
// of request
byte[] bTrunc = new byte[numberOfBytesRead];
for (int i = 0; i < numberOfBytesRead; i++)
bTrunc[i] = b[i];
stream.write(bTrunc);
} else
stream.write(b);
readCounter++;
}
// we will close the stream later on, when all data is processed
servletin.reset();
//prepare stream to write into mime entity
stream.setPosition(0); //set pointer at the first character/byte
body.setContentFromBytes(stream, contentType, MIMEEntity.ENC_NONE);
body.decodeContent();
//now care about file name and other header ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Business Solutions Microsoft® Office Access 2007 Forms, Reports, and Queries

Business Solutions Microsoft® Office Access 2007 Forms, Reports, and Queries

Paul McFedries
Human-Centric Business Process Management with WebSphere Process Server V6

Human-Centric Business Process Management with WebSphere Process Server V6

Martin Keen, Omar Bahy, Waveney Croson, Andy Garratt, Ben Karchner, Ines Lehmann, Frank Neumann, Lincoln Roach

Publisher Resources

ISBN: 0738495603Purchase book