| | |
| | | /** |
| | | * This convenience method allows to read a |
| | | * {@link frame.upload.FileItemStream}'s |
| | | * content into a string. The platform's default character encoding |
| | | * content into a String. The platform's default character encoding |
| | | * is used for converting bytes into characters. |
| | | * @param pStream The input stream to read. |
| | | * @see #asString(InputStream, String) |
| | | * @return The streams contents, as a string. |
| | | * @return The streams contents, as a String. |
| | | * @throws IOException An I/O error occurred. |
| | | */ |
| | | public static String asString(InputStream pStream) throws IOException { |
| | |
| | | /** |
| | | * This convenience method allows to read a |
| | | * {@link frame.upload.FileItemStream}'s |
| | | * content into a string, using the given character encoding. |
| | | * content into a String, using the given character encoding. |
| | | * @param pStream The input stream to read. |
| | | * @param pEncoding The character encoding, typically "UTF-8". |
| | | * @see #asString(InputStream) |
| | | * @return The streams contents, as a string. |
| | | * @return The streams contents, as a String. |
| | | * @throws IOException An I/O error occurred. |
| | | */ |
| | | public static String asString(InputStream pStream, String pEncoding) |