Package com.redwood.scheduler.api.http
Interface Part
- 
 public interface PartModeled after Part from Servlet 3.0 spec
- 
- 
Method SummaryAll Methods Instance Methods Abstract Methods Modifier and Type Method Description byte[]getByteArray()Get the byte array for this file.StringgetContentType()Gets the content type of this part.StringgetFileName()Get the filename for this part if it is setStringgetHeader(String name)Get the header for the given name.Collection<String>getHeaderNames()Get all header names of this PartCollection<String>getHeaders(String name)get all headers for the given name.InputStreamgetInputStream()Gets the content of this part as an InputStreamStringgetName()Gets the name of this partlonggetSize()Returns the size of this file.
 
- 
- 
- 
Method Detail- 
getContentTypeString getContentType() Gets the content type of this part.- Returns:
- The content type of this part
 
 - 
getHeaderString getHeader(String name) Get the header for the given name. The name is case insensitive. If the name does not exist, null is returned. If there are multiple headers with the given name, the first will be returned.- Parameters:
- name- to get the header for
- Returns:
- The given header, null if it does not exist.
 
 - 
getHeaderNamesCollection<String> getHeaderNames() Get all header names of this Part- Returns:
- A collection of all header names.
 
 - 
getHeadersCollection<String> getHeaders(String name) get all headers for the given name. The name is case insensitive.- Parameters:
- name- the name of the header
- Returns:
- A (possibly empty) collection of all the headers for the given name.
 
 - 
getInputStreamInputStream getInputStream() Gets the content of this part as an InputStream- Returns:
- The content of this part as an InputStream
 
 - 
getNameString getName() Gets the name of this part- Returns:
- the name of this Part
 
 - 
getSizelong getSize() Returns the size of this file.- Returns:
- The size of the file in bytes
 
 - 
getFileNameString getFileName() Get the filename for this part if it is set- Returns:
- the filename, or null when there is no filename
 
 - 
getByteArraybyte[] getByteArray() Get the byte array for this file. Use this only where inputstream can not be used, since it saves making another copy of the data.- Returns:
- data for this file.
 
 
- 
 
-