You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by gg...@apache.org on 2023/04/03 02:50:56 UTC
[commons-fileupload] branch master updated: Remove unused methods
This is an automated email from the ASF dual-hosted git repository.
ggregory pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/commons-fileupload.git
The following commit(s) were added to refs/heads/master by this push:
new 8a0a6b1 Remove unused methods
8a0a6b1 is described below
commit 8a0a6b1d617599ce9a52b899eab239a3799117ec
Author: Gary Gregory <ga...@gmail.com>
AuthorDate: Sun Apr 2 22:50:53 2023 -0400
Remove unused methods
---
.../apache/commons/fileupload2/util/Streams.java | 35 ----------------------
1 file changed, 35 deletions(-)
diff --git a/src/main/java/org/apache/commons/fileupload2/util/Streams.java b/src/main/java/org/apache/commons/fileupload2/util/Streams.java
index 0927a72..42135ef 100644
--- a/src/main/java/org/apache/commons/fileupload2/util/Streams.java
+++ b/src/main/java/org/apache/commons/fileupload2/util/Streams.java
@@ -34,41 +34,6 @@ public final class Streams {
*/
public static final int DEFAULT_BUFFER_SIZE = 8192;
- /**
- * This convenience method allows to read a
- * {@link org.apache.commons.fileupload2.FileItemStream}'s
- * content into a string. The platform's default character encoding
- * is used for converting bytes into characters.
- *
- * @param inputStream The input stream to read.
- * @see #asString(InputStream, String)
- * @return The streams contents, as a string.
- * @throws IOException An I/O error occurred.
- */
- public static String asString(final InputStream inputStream) throws IOException {
- final ByteArrayOutputStream baos = new ByteArrayOutputStream();
- copy(inputStream, baos, true);
- return baos.toString();
- }
-
- /**
- * This convenience method allows to read a
- * {@link org.apache.commons.fileupload2.FileItemStream}'s
- * content into a string, using the given character encoding.
- *
- * @param inputStream The input stream to read.
- * @param encoding The character encoding, typically "UTF-8".
- * @see #asString(InputStream)
- * @return The streams contents, as a string.
- * @throws IOException An I/O error occurred.
- */
- public static String asString(final InputStream inputStream, final String encoding)
- throws IOException {
- final ByteArrayOutputStream baos = new ByteArrayOutputStream();
- copy(inputStream, baos, true);
- return baos.toString(encoding);
- }
-
/**
* Checks, whether the given file name is valid in the sense,
* that it doesn't contain any NUL characters. If the file name