com.ibm.ccd.ui.portlets.fileupload
Class MultipartInputStreamHandler

java.lang.Object
  extended by com.ibm.ccd.ui.portlets.fileupload.MultipartInputStreamHandler

public class MultipartInputStreamHandler
extends java.lang.Object

A class to aid in reading multipart/form-data from a ServletInputStream. It keeps track of how many bytes have been read and detects when the Content-Length limit has been reached. This is necessary because some servlet engines are slow to notice the end of stream


Constructor Summary
MultipartInputStreamHandler(javax.servlet.ServletInputStream pInputStream, java.lang.String pBoundary, int pTotalExpected)
          Constructor
 
Method Summary
 java.lang.String readLine()
          reads a line from ServletInputStream
 int readLine(byte[] b, int off, int len)
          reads the line
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MultipartInputStreamHandler

public MultipartInputStreamHandler(javax.servlet.ServletInputStream pInputStream,
                                   java.lang.String pBoundary,
                                   int pTotalExpected)
Constructor

Parameters:
pInputStream -
pBoundary -
pTotalExpected -
Method Detail

readLine

public java.lang.String readLine()
                          throws java.io.IOException
reads a line from ServletInputStream

Returns:
String
Throws:
java.io.IOException

readLine

public int readLine(byte[] b,
                    int off,
                    int len)
             throws java.io.IOException
reads the line

Parameters:
b -
off -
len -
Returns:
integer
Throws:
java.io.IOException