if(LoStrTempType.indexOf("pdf1") != -1)
try
{
LoStrTempFieldValue = "";
Blob blob = SqlResult.getBlob(LoStrTempField);
InputStream is2 = blob.getBinaryStream();
byte data[] = blob.getBytes(1L, (int)blob.length());
int length1 = is2.read();
if(length1 != -1)
{
String filename = "C:/temp/Bewerbung_" + FileName1 + "_" + FileName2 + "." + FiletypCL;
System.out.println(filename);
File f = new File(filename);
f.createNewFile();
BufferedOutputStream os = new BufferedOutputStream(new FileOutputStream(f));
os.write(data, 0, (int)blob.length());
os.flush();
os.close();
is2.close();
RichTextItem rtitem = LoNotesDocument.createRichTextItem("PersonFiles");
rtitem.embedObject(1454, "", filename, "PersonFiles");
rtitem.addNewLine();
f.delete();
}
}
catch(Exception oe)
{
System.out.println("Error: Insert of PDF failed:Skip");
LoIntOK = 0;
}
else
if(LoStrTempType.indexOf("pdf2") != -1)
try
{
LoStrTempFieldValue = "";
Blob blob = SqlResult.getBlob(LoStrTempField);
InputStream is2 = blob.getBinaryStream();
int length2 = is2.read();
if(length2 != -1)
{
byte data[] = blob.getBytes(1L, (int)blob.length());
String filename = "C:/temp/Lebenslauf_" + FileName1 + "_" + FileName2 + "." + FiletypCV;
System.out.println(filename);
File f = new File(filename);
f.createNewFile();
BufferedOutputStream os = new BufferedOutputStream(new FileOutputStream(f));
os.write(data, 0, (int)blob.length());
os.flush();
os.close();
is2.close();
if(LoNotesDocument.hasItem("PersonFiles"))
{
RichTextItem rtitem = (RichTextItem)LoNotesDocument.getFirstItem("PersonFiles");
rtitem.embedObject(1454, "", filename, "PersonFiles");
} else
{
RichTextItem rtitem = LoNotesDocument.createRichTextItem("PersonFiles");
rtitem.embedObject(1454, "", filename, "PersonFiles");
}
f.delete();
}
}
catch(Exception oe)
{
System.out.println("Error: Insert of PDF failed:Skip");
LoIntOK = 0;
}
else
if(LoStrTempType.indexOf("pdf3") != -1)
try
{
LoStrTempFieldValue = "";
Blob blob = SqlResult.getBlob(LoStrTempField);
InputStream is2 = blob.getBinaryStream();
int length2 = is2.read();
if(length2 != -1)
{
byte data[] = blob.getBytes(1L, (int)blob.length());
String filename = "C:/temp/Zeugnisse_" + FileName1 + "_" + FileName2 + "." + FiletypRef;
System.out.println(filename);
File f = new File(filename);
f.createNewFile();
BufferedOutputStream os = new BufferedOutputStream(new FileOutputStream(f));
os.write(data, 0, (int)blob.length());
os.flush();
os.close();
is2.close();
if(LoNotesDocument.hasItem("PersonFiles"))
{
RichTextItem rtitem = (RichTextItem)LoNotesDocument.getFirstItem("PersonFiles");
rtitem.embedObject(1454, "", filename, "PersonFiles");
} else
{
RichTextItem rtitem = LoNotesDocument.createRichTextItem("PersonFiles");
rtitem.embedObject(1454, "", filename, "PersonFiles");
}
f.delete();
}
}
catch(Exception oe)
{
System.out.println("Error: Insert of PDF failed:Skip");
LoIntOK = 0;
}
else
if(LoStrTempType.indexOf("pdf4") != -1)
try
{
LoStrTempFieldValue = "";
Blob blob = SqlResult.getBlob(LoStrTempField);
InputStream is2 = blob.getBinaryStream();
int length2 = is2.read();
if(length2 != -1)
{
byte data[] = blob.getBytes(1L, (int)blob.length());
String filename = "C:/temp/Weiteres_" + FileName1 + "_" + FileName2 + "." + FiletypMore;
System.out.println(filename);
File f = new File(filename);
f.createNewFile();
BufferedOutputStream os = new BufferedOutputStream(new FileOutputStream(f));
os.write(data, 0, (int)blob.length());
os.flush();
os.close();
is2.close();
if(LoNotesDocument.hasItem("PersonFiles"))
{
RichTextItem rtitem = (RichTextItem)LoNotesDocument.getFirstItem("PersonFiles");
rtitem.embedObject(1454, "", filename, "PersonFiles");
} else
{
RichTextItem rtitem = LoNotesDocument.createRichTextItem("PersonFiles");
rtitem.embedObject(1454, "", filename, "PersonFiles");
}
f.delete();
}
}
catch(Exception oe)
{
System.out.println("Error: Insert of PDF failed:Skip");
LoIntOK = 0;
}