com.wewebu.ow.server.util.upload
Class OwUpStreamParser

java.lang.Object
  extended by com.wewebu.ow.server.util.upload.OwUpStreamParser

public class OwUpStreamParser
extends Object

A utility class to handle multipart/form-data requests, the kind of requests that support file uploads. This class uses a "pull" model where the reading of incoming files and parameters is controlled by the client code, which allows incoming files to be stored into any OutputStream.

Alfresco Workdesk
Copyright (c) Alfresco Software, Inc.
All rights reserved.

For licensing information read the license.txt file or
go to: http://wiki.alfresco.com


Constructor Summary
OwUpStreamParser(javax.servlet.http.HttpServletRequest req_p)
          Creates a MultipartParser from the specified request buffers for performance
 
Method Summary
 OwMultiPart readNextPart()
          Read the next part arriving in the stream.
 void tidyUp()
          tidy up all resources, especially close open streams
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

OwUpStreamParser

public OwUpStreamParser(javax.servlet.http.HttpServletRequest req_p)
                 throws IOException
Creates a MultipartParser from the specified request buffers for performance

Parameters:
req_p - HttpServletRequest the servlet request.
Throws:
IOException - if an input or output exception has occurred.
Method Detail

readNextPart

public OwMultiPart readNextPart()
                         throws IOException
Read the next part arriving in the stream. Will be either a FilePart or to indicate there are no more parts to be read.

Returns:
FilePart - either a FilePart, or null if there are no more parts to read.
Throws:
IOException - if an input or output exception has occurred.

tidyUp

public void tidyUp()
            throws IOException
tidy up all resources, especially close open streams

Throws:
IOException


Copyright © 2013 Alfresco Business Solutions. All Rights Reserved.