docs: public long readMultipartUpload() throws IOException
  	{
  		input = request.getInputStream();
  		//the next variable stores all post data and is useful for debug purposes
  
  
  		bytesReadAsLine = input.readLine(line, 0, BUFFER_SIZE);
  		if (bytesReadAsLine <= 2)
  		{
  			return 0;
  		}
  
  		bytesRead = bytesReadAsLine;
  
  
  		//save the multipart boundary string
  		String boundary = new String(line, 0, bytesReadAsLine - 2);
  
  		while ((bytesReadAsLine = input.readLine(line, 0, BUFFER_SIZE)) != -1)
  		{
  
  			readPropertiesUntilEmptyLine();
  			//TODO fullFileName may be empty in which case storage output stream cannot be opened
  
  
  			bytesRead += bytesReadAsLine;
  			bytesReadAsLine = input.readLine(line, 0, BUFFER_SIZE);
  
  			//before the boundary that indicates the end of the file
  			//there is a line separator which does not belong to the file
  			//it's necessary to filter it out without too much memory overhead
  			//it's not clear where the line separator comes from.
  			//this has to work on Windows and UNIX
  
  			partialCopyOutputStream = getStorageOutputStream();
  
  			readUploadedFile(boundary, partialCopyOutputStream);
  			bytesRead += bytesReadAsLine;
  
  			if (fullFileName != null)
  			{
  				if (uploadDir == null)
  				{
  					FileData file = new FileData(fullFileName, contentType);
  					file.setDescription("Obtained from: " + fullFileName);
  					file.setRawData(((ByteArrayOutputStream) partialCopyOutputStream).toByteArray());
  					//propertyName is specified in HTML form like <INPUT TYPE="FILE" NAME="myPropertyName">
  					request.setAttribute(propertyName, file);
  					System.out.println(new LogEntry("file found in multi-part data: " + file));
  				}
  			}
  			else
  			{
  				String propertyValue = partialCopyOutputStream.toString();
  				request.setAttribute(propertyName, propertyValue);
  				System.out.println(new LogEntry("property found in multi-part data:"  + propertyName + '=' + propertyValue));
  			}
  			partialCopyOutputStream.close();
  
  			fullFileName = null;
  		}
  		System.out.println(new LogEntry("post data retrieved from multi-part data: " + bytesRead + " bytes"));
  
  		return bytesRead;
  	}