/** * This is used to acquire the content of the part as a string. * The encoding of the string is taken from the content type. * If no content type is sent the content is decoded in the * standard default of ISO-8859-1. * * @return this returns a string representing the content * * @throws IOException thrown if the content can not be created */ public String getContent() throws IOException { return body.getContent(); }
/** * This is used to read the content body. The specifics of the data * that is read from this <code>InputStream</code> can be determined * by the <code>getContentLength</code> method. If the data sent by * the client is chunked then it is decoded, see RFC 2616 section * 3.6. Also multipart data is available as <code>Part</code> objects * however the raw content of the multipart body is still available. * * @return the input stream containing the message body */ public InputStream getInputStream() throws IOException { return body.getInputStream(); }
/** * This method is used to acquire a <code>Part</code> from the * HTTP request using a known name for the part. This is typically * used when there is a file upload with a multipart POST request. * All parts that are not files can be acquired as string values * from the attachment object. * * @param name this is the name of the part object to acquire * * @return the named part or null if the part does not exist */ public Part getPart(String name) { return body.getPart(name); }
/** * This method is used to get all <code>Part</code> objects that * are associated with the request. Each attachment contains the * body and headers associated with it. If the request is not a * multipart POST request then this will return an empty list. * * @return the list of parts associated with this request */ public List<Part> getParts() { return body.getParts(); } }
/** * This method is used to get all <code>Part</code> objects that * are associated with the request. Each attachment contains the * body and headers associated with it. If the request is not a * multipart POST request then this will return an empty list. * * @return the list of parts associated with this request */ public List<Part> getParts() { return body.getParts(); } }
/** * This is used to acquire the content of the part as a string. * The encoding of the string is taken from the content type. * If no content type is sent the content is decoded in the * standard default of ISO-8859-1. * * @return this returns a string representing the content * * @throws IOException thrown if the content can not be created */ public String getContent() throws IOException { return body.getContent(); }
/** * This is used to read the content body. The specifics of the data * that is read from this <code>InputStream</code> can be determined * by the <code>getContentLength</code> method. If the data sent by * the client is chunked then it is decoded, see RFC 2616 section * 3.6. Also multipart data is available as <code>Part</code> objects * however the raw content of the multipart body is still available. * * @return the input stream containing the message body */ public InputStream getInputStream() throws IOException { return body.getInputStream(); }
/** * This method is used to get all <code>Part</code> objects that * are associated with the request. Each attachment contains the * body and headers associated with it. If the request is not a * multipart POST request then this will return an empty list. * * @return the list of parts associated with this request */ public List<Part> getParts() { return body.getParts(); } }
/** * This method is used to acquire a <code>Part</code> from the * HTTP request using a known name for the part. This is typically * used when there is a file upload with a multipart POST request. * All parts that are not files can be acquired as string values * from the attachment object. * * @param name this is the name of the part object to acquire * * @return the named part or null if the part does not exist */ public Part getPart(String name) { return body.getPart(name); }
/** * This is used to acquire the content of the part as a string. * The encoding of the string is taken from the content type. * If no content type is sent the content is decoded in the * standard default of ISO-8859-1. * * @return this returns a string representing the content * * @throws IOException thrown if the content can not be created */ public String getContent() throws IOException { return body.getContent(); }
/** * This is used to acquire an <code>InputStream</code> for the * part. Acquiring the stream allows the content of the part to * be consumed by reading the stream. Each invocation of this * method will produce a new stream starting from the first byte. * * @return this returns the stream for this part object * * @throws IOException thrown if the stream can not be created */ public InputStream getInputStream() throws IOException { return body.getInputStream(); }
/** * This method is used to acquire a <code>Part</code> from the * HTTP request using a known name for the part. This is typically * used when there is a file upload with a multipart POST request. * All parts that are not files can be acquired as string values * from the attachment object. * * @param name this is the name of the part object to acquire * * @return the named part or null if the part does not exist */ public Part getPart(String name) { return body.getPart(name); }
/** * This is used to get the content body. This will essentially get * the content from the body and present it as a single string. * The encoding of the string is determined from the content type * charset value. If the charset is not supported this will throw * an exception. Typically only text values should be extracted * using this method if there is a need to parse that content. * * @param type this is the content type used with the request * * @return the input stream containing the message body */ public String getContent(ContentType type) throws IOException { String charset = type.getCharset(); if(charset == null) { charset = "ISO-8859-1"; } return body.getContent(charset); }
/** * This is used to acquire an <code>InputStream</code> for the * part. Acquiring the stream allows the content of the part to * be consumed by reading the stream. Each invocation of this * method will produce a new stream starting from the first byte. * * @return this returns the stream for this part object * * @throws IOException thrown if the stream can not be created */ public InputStream getInputStream() throws IOException { return body.getInputStream(); }
/** * This is used to get the content body. This will essentially get * the content from the body and present it as a single string. * The encoding of the string is determined from the content type * charset value. If the charset is not supported this will throw * an exception. Typically only text values should be extracted * using this method if there is a need to parse that content. * * @param type this is the content type used with the request * * @return the input stream containing the message body */ public String getContent(ContentType type) throws IOException { String charset = type.getCharset(); if(charset == null) { charset = "ISO-8859-1"; } return body.getContent(charset); }
/** * This is used to acquire an <code>InputStream</code> for the * part. Acquiring the stream allows the content of the part to * be consumed by reading the stream. Each invocation of this * method will produce a new stream starting from the first byte. * * @return this returns the stream for this part object * * @throws IOException thrown if the stream can not be created */ public InputStream getInputStream() throws IOException { return body.getInputStream(); }
/** * This is used to get the content body. This will essentially get * the content from the body and present it as a single string. * The encoding of the string is determined from the content type * charset value. If the charset is not supported this will throw * an exception. Typically only text values should be extracted * using this method if there is a need to parse that content. * * @param type this is the content type used with the request * * @return the input stream containing the message body */ public String getContent(ContentType type) throws IOException { String charset = type.getCharset(); if(charset == null) { charset = "ISO-8859-1"; } return body.getContent(charset); }
/** * This is used to read the content body. The specifics of the data * that is read from this <code>InputStream</code> can be determined * by the <code>getContentLength</code> method. If the data sent by * the client is chunked then it is decoded, see RFC 2616 section * 3.6. Also multipart data is available as <code>Part</code> objects * however the raw content of the multipart body is still available. * * @return the input stream containing the message body */ public InputStream getInputStream() throws IOException { return body.getInputStream(); }
/** * This is used to get the content body. This will essentially get * the content from the body and present it as a single string. * The encoding of the string is determined from the content type * charset value. If the charset is not supported this will throw * an exception. Typically only text values should be extracted * using this method if there is a need to parse that content. * * @return the body content containing the message body */ public String getContent() throws IOException { ContentType type = getContentType(); if(type == null) { return body.getContent("ISO-8859-1"); } return getContent(type); }
/** * This is used to get the content body. This will essentially get * the content from the body and present it as a single string. * The encoding of the string is determined from the content type * charset value. If the charset is not supported this will throw * an exception. Typically only text values should be extracted * using this method if there is a need to parse that content. * * @return the body content containing the message body */ public String getContent() throws IOException { ContentType type = getContentType(); if(type == null) { return body.getContent("ISO-8859-1"); } return getContent(type); }