Package org.apache.jackrabbit.webdav.io
Class InputContextImpl
- java.lang.Object
-
- org.apache.jackrabbit.webdav.io.InputContextImpl
-
- All Implemented Interfaces:
InputContext
public class InputContextImpl extends java.lang.Object implements InputContext
InputContextImpl
class encapsulates theInputStream
and some header values as present in the POST, PUT or MKCOL request.
-
-
Constructor Summary
Constructors Constructor Description InputContextImpl(HttpServletRequest request, java.io.InputStream in)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.String
getContentLanguage()
Returns the content language ornull
.long
getContentLength()
Returns the length of the data or -1 if the contentlength could not be determined.java.lang.String
getContentType()
Return the content type ornull
java.io.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.java.lang.String
getProperty(java.lang.String propertyName)
Returns the value of the given property ornull
if this property does not exist.boolean
hasStream()
Return true, if there are any data to be imported (and not only properties)
-
-
-
Constructor Detail
-
InputContextImpl
public InputContextImpl(HttpServletRequest request, java.io.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 interfaceInputContext
- Returns:
-
getInputStream
public java.io.InputStream getInputStream()
Returns the input stream of the resource to import.- Specified by:
getInputStream
in interfaceInputContext
- 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 interfaceInputContext
- Returns:
- the modification time.
-
getContentLanguage
public java.lang.String getContentLanguage()
Returns the content language ornull
.- Specified by:
getContentLanguage
in interfaceInputContext
- 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 interfaceInputContext
- Returns:
- content length or -1 when unknown
-
getContentType
public java.lang.String getContentType()
Description copied from interface:InputContext
Return the content type ornull
- Specified by:
getContentType
in interfaceInputContext
- Returns:
-
getProperty
public java.lang.String getProperty(java.lang.String propertyName)
Description copied from interface:InputContext
Returns the value of the given property ornull
if this property does not exist.- Specified by:
getProperty
in interfaceInputContext
- Returns:
- String property value or
null
-
-