public void SaveStream(InputStream inputstream) throws IOException{
String CharacterEncoding="ISO-8859-1";
byte Linebyte[] = new byte[1024];
int ai[] = new int[1];
File file = new File(uploadpath, FileName);
FileOutputStream fileoutputstream = new FileOutputStream(file);
String s = null;
do
{
if (s!=null){
fileoutputstream.write(Linebyte, 0, ai[0]);
fileoutputstream.flush();
}
try {
ai[0] = servletinputstream.read(Linebyte, 0, Linebyte.length);
}
catch (weblogic.utils.NestedRuntimeException se) {
System.out.print("Save File Error!/n");
}
if (ai[0]<0){
break;
}
s = new String(Linebyte, 0, ai[0], CharacterEncoding);
long l = Long.parseLong(String.valueOf(s.length()));
servletinputstream.skip(l);
}while(true);
inputstream.close();
fileoutputstream.close();
}