org.apache.sling.engine.impl.parameters
Class ContainerRequestParameter

java.lang.Object
  extended by org.apache.sling.engine.impl.parameters.ContainerRequestParameter
All Implemented Interfaces:
RequestParameter

public class ContainerRequestParameter
extends Object

The ContainerRequestParameter TODO


Method Summary
 byte[] get()
          Returns the contents of the parameter as an array of bytes.
 String getContentType()
          Returns the content type passed by the browser or null if not defined.
 String getFileName()
          Returns the original filename in the client's filesystem, as provided by the browser (or other client software).
 InputStream getInputStream()
          Returns an InputStream that can be used to retrieve the contents of the file.
 long getSize()
          Returns the size in bytes of the parameter.
 String getString()
          Returns the contents of the parameter as a String, using the default character encoding.
 String getString(String encoding)
          Returns the contents of the parameter as a String, using the specified encoding.
 boolean isFormField()
          Determines whether or not this instance represents a simple form field or an uploaded file.
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Method Detail

get

public byte[] get()
Description copied from interface: RequestParameter
Returns the contents of the parameter as an array of bytes.

Returns:
The contents of the parameter as an array of bytes.
See Also:
RequestParameter.get()

getContentType

public String getContentType()
Description copied from interface: RequestParameter
Returns the content type passed by the browser or null if not defined.

Returns:
The content type passed by the browser or null if not defined.
See Also:
RequestParameter.getContentType()

getInputStream

public InputStream getInputStream()
Description copied from interface: RequestParameter
Returns an InputStream that can be used to retrieve the contents of the file.

Returns:
An InputStream that can be used to retrieve the contents of the file.
See Also:
RequestParameter.getInputStream()

getFileName

public String getFileName()
Description copied from interface: RequestParameter
Returns the original filename in the client's filesystem, as provided by the browser (or other client software). In most cases, this will be the base file name, without path information. However, some clients, such as the Opera browser, do include path information.

Returns:
The original filename in the client's filesystem.
See Also:
RequestParameter.getFileName()

getSize

public long getSize()
Description copied from interface: RequestParameter
Returns the size in bytes of the parameter.

Returns:
The size in bytes of the parameter.
See Also:
RequestParameter.getSize()

getString

public String getString()
Description copied from interface: RequestParameter
Returns the contents of the parameter as a String, using the default character encoding. This method uses RequestParameter.get() to retrieve the contents of the item.

Returns:
The contents of the parameter, as a string.
See Also:
RequestParameter.getString()

getString

public String getString(String encoding)
                 throws UnsupportedEncodingException
Description copied from interface: RequestParameter
Returns the contents of the parameter as a String, using the specified encoding. This method uses link RequestParameter.get() to retrieve the contents of the item.

Parameters:
encoding - The character encoding to use.
Returns:
The contents of the parameter, as a string.
Throws:
UnsupportedEncodingException - if the requested character encoding is not available.
See Also:
RequestParameter.getString(java.lang.String)

isFormField

public boolean isFormField()
Description copied from interface: RequestParameter
Determines whether or not this instance represents a simple form field or an uploaded file.

Returns:
true if the instance represents a simple form field; false if it represents an uploaded file.
See Also:
RequestParameter.isFormField()

toString

public String toString()
Overrides:
toString in class Object


Copyright © 2007-2013 The Apache Software Foundation. All Rights Reserved.