|
|
|
|
@ -23,8 +23,6 @@ import java.io.IOException;
@@ -23,8 +23,6 @@ import java.io.IOException;
|
|
|
|
|
import java.io.InputStream; |
|
|
|
|
import java.io.InputStreamReader; |
|
|
|
|
import java.io.OutputStream; |
|
|
|
|
import java.io.OutputStreamWriter; |
|
|
|
|
import java.io.Writer; |
|
|
|
|
import java.nio.charset.Charset; |
|
|
|
|
|
|
|
|
|
import org.springframework.lang.Nullable; |
|
|
|
|
@ -133,9 +131,8 @@ public abstract class StreamUtils {
@@ -133,9 +131,8 @@ public abstract class StreamUtils {
|
|
|
|
|
Assert.notNull(charset, "No Charset specified"); |
|
|
|
|
Assert.notNull(out, "No OutputStream specified"); |
|
|
|
|
|
|
|
|
|
Writer writer = new OutputStreamWriter(out, charset); |
|
|
|
|
writer.write(in); |
|
|
|
|
writer.flush(); |
|
|
|
|
out.write(in.getBytes(charset)); |
|
|
|
|
out.flush(); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
|