org.apache.jackrabbit.webdav.io
Class InputContextImpl

java.lang.Object
  extended byorg.apache.jackrabbit.webdav.io.InputContextImpl
All Implemented Interfaces:
InputContext

public class InputContextImpl
extends Object
implements InputContext

InputContextImpl class encapsulates the InputStream and some header values as present in the POST, PUT or MKCOL request.


Constructor Summary
InputContextImpl(javax.servlet.http.HttpServletRequest request, InputStream in)
           
 
Method Summary
 String getContentLanguage()
          Returns the content language or null.
 long getContentLength()
          Returns the length of the data or -1 if the contentlength could not be determined.
 String getContentType()
          Return the content type or null
 InputStream getInputStream()
          Returns the input stream of the resource to import.
 long getModificationTime()
          Returns the modification time of the resource or the current time if the modification time has not been set.
 String getProperty(String propertyName)
          Returns the value of the given property or null if this property does not exist.
 boolean hasStream()
          Return true, if there are any data to be imported (and not only properties)
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

InputContextImpl

public InputContextImpl(javax.servlet.http.HttpServletRequest request,
                        InputStream in)
Method Detail

hasStream

public boolean hasStream()
Description copied from interface: InputContext
Return true, if there are any data to be imported (and not only properties)

Specified by:
hasStream in interface InputContext
Returns:

getInputStream

public InputStream getInputStream()
Returns the input stream of the resource to import.

Specified by:
getInputStream in interface InputContext
Returns:
the input stream.

getModificationTime

public long getModificationTime()
Description copied from interface: InputContext
Returns the modification time of the resource or the current time if the modification time has not been set.

Specified by:
getModificationTime in interface InputContext
Returns:
the modification time.

getContentLanguage

public String getContentLanguage()
Returns the content language or null.

Specified by:
getContentLanguage in interface InputContext
Returns:
contentLanguage

getContentLength

public long getContentLength()
Description copied from interface: InputContext
Returns the length of the data or -1 if the contentlength could not be determined.

Specified by:
getContentLength in interface InputContext
Returns:
the content length

getContentType

public String getContentType()
Description copied from interface: InputContext
Return the content type or null

Specified by:
getContentType in interface InputContext
Returns:

getProperty

public String getProperty(String propertyName)
Description copied from interface: InputContext
Returns the value of the given property or null if this property does not exist.

Specified by:
getProperty in interface InputContext
Parameters:
propertyName -
Returns:
String property value or null


Copyright © 2005-2006 . All Rights Reserved.