iStream = new DataInputStream(request.getInputStream());
byte[] readByte = new byte[contentLength];
int sizeCheck = 0;
int readByteSize = 0; 
while(totalReadByte < contentLength)
{
if(sizeCheck > MAX_ALLOW)
{
out.println("Over the allow range of the file size");
}
else
{
sizeCheck = totalReadByte + iStream.available();
readByteSize = iStream.read(readByte,totalReadByte,contentLength);
totalReadByte = totalReadByte + readByteSize;
out.println("totalReadByte:"+totalReadByte+"<BR>");
}
}我没有规定iStream的长度呀!!