jet.servlet.internal
Class JetFileContextFactory

java.lang.Object
  extended by jet.servlet.internal.JetFileContextFactory

public class JetFileContextFactory
extends java.lang.Object

This class is the factory for JetFileUpload.

Author:
Markus.Meisters@web.de

Constructor Summary
JetFileContextFactory()
           
 
Method Summary
static JetFileUploaded getFileContext(org.apache.commons.fileupload.FileItem file)
          This Method (I hope so) returns a correct file object if a file was post in the form
static JetFileUploaded getFileContext(java.io.InputStream is)
          This Method (I hope so) returns a correct file object if a file was post in the form
private static java.io.ByteArrayOutputStream readLine(java.io.InputStream is)
          This method reads lines from the input stream
private static java.lang.String removeQuotes(java.lang.String value)
          This method removes quotes from the given string
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JetFileContextFactory

public JetFileContextFactory()
Method Detail

getFileContext

public static JetFileUploaded getFileContext(java.io.InputStream is)
This Method (I hope so) returns a correct file object if a file was post in the form

Parameters:
is - the inputstream of the request
Returns:
jets file representation

getFileContext

public static JetFileUploaded getFileContext(org.apache.commons.fileupload.FileItem file)
This Method (I hope so) returns a correct file object if a file was post in the form

Parameters:
file - the FileItem to use
Returns:
jets file representation

removeQuotes

private static java.lang.String removeQuotes(java.lang.String value)
This method removes quotes from the given string

Parameters:
value - the string to dequote
Returns:
the result

readLine

private static java.io.ByteArrayOutputStream readLine(java.io.InputStream is)
                                               throws java.io.IOException
This method reads lines from the input stream

Parameters:
is - the inputstream to read from
Returns:
the line readed
Throws:
java.io.IOException