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
InputContextImplclass encapsulates theInputStreamand some header values as present in the POST, PUT or MKCOL request.
-
-
Constructor Summary
Constructors Constructor Description InputContextImpl(javax.servlet.http.HttpServletRequest request, java.io.InputStream in)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.StringgetContentLanguage()Returns the content language ornull.longgetContentLength()Returns the length of the data or -1 if the contentlength could not be determined.java.lang.StringgetContentType()Return the content type ornulljava.io.InputStreamgetInputStream()Returns the input stream of the resource to import.longgetModificationTime()Returns the modification time of the resource or the current time if the modification time has not been set.java.lang.StringgetProperty(java.lang.String propertyName)Returns the value of the given property ornullif this property does not exist.booleanhasStream()Return true, if there are any data to be imported (and not only properties)
-
-
-
Method Detail
-
hasStream
public boolean hasStream()
Description copied from interface:InputContextReturn true, if there are any data to be imported (and not only properties)- Specified by:
hasStreamin interfaceInputContext- Returns:
-
getInputStream
public java.io.InputStream getInputStream()
Returns the input stream of the resource to import.- Specified by:
getInputStreamin interfaceInputContext- Returns:
- the input stream.
-
getModificationTime
public long getModificationTime()
Description copied from interface:InputContextReturns the modification time of the resource or the current time if the modification time has not been set.- Specified by:
getModificationTimein interfaceInputContext- Returns:
- the modification time.
-
getContentLanguage
public java.lang.String getContentLanguage()
Returns the content language ornull.- Specified by:
getContentLanguagein interfaceInputContext- Returns:
- contentLanguage
-
getContentLength
public long getContentLength()
Description copied from interface:InputContextReturns the length of the data or -1 if the contentlength could not be determined.- Specified by:
getContentLengthin interfaceInputContext- Returns:
- content length or -1 when unknown
-
getContentType
public java.lang.String getContentType()
Description copied from interface:InputContextReturn the content type ornull- Specified by:
getContentTypein interfaceInputContext- Returns:
-
getProperty
public java.lang.String getProperty(java.lang.String propertyName)
Description copied from interface:InputContextReturns the value of the given property ornullif this property does not exist.- Specified by:
getPropertyin interfaceInputContext- Returns:
- String property value or
null
-
-