public class BambooIOUtils extends Object
| Modifier and Type | Field and Description |
|---|---|
static Charset |
UTF_8_CHARSET
Deprecated.
since 5.15 use
StandardCharsets instead |
| Modifier and Type | Method and Description |
|---|---|
static boolean |
contentTextEquals(InputStream input1,
InputStream input2,
boolean trimLines)
Perform textual comparison of contents returned by two input streams.
|
static boolean |
contentTextEquals(Reader input1,
Reader input2,
boolean trimLines)
Perform textual comparison of contents returned by two readers.
|
static void |
copy(InputStream inputStream,
OutputStream outputStream) |
static void |
copyWithRuntimeExceptionThrowing(InputStream inputStream,
OutputStream outputStream)
Copy input stream to output stream, closing streams when finished.
|
static boolean |
isUtf8Compliant(InputStream is)
Checks for utf8 compliance of input stream.
|
@Deprecated public static final Charset UTF_8_CHARSET
StandardCharsets insteadpublic static boolean contentTextEquals(Reader input1, Reader input2, boolean trimLines) throws IOException
input1 - first input readerinput2 - second input readertrimLines - flag enforcing trimming lines before comparisonIOException - if an I/O error occurspublic static boolean contentTextEquals(InputStream input1, InputStream input2, boolean trimLines) throws IOException
input1 - first input streaminput2 - second input streamtrimLines - flag enforcing trimming lines before comparisonIOException - if an I/O error occurspublic static boolean isUtf8Compliant(@NotNull
InputStream is)
throws IOException
is - the input stream to check for utf8 compliance. Does not need to (should not) be buffered.IOException - in case of IO errorpublic static void copy(InputStream inputStream, OutputStream outputStream) throws IOException
IOExceptionorg.apache.commons.io.IOUtils#copy(InputStream, OutputStream)}
The difference is that this method closes both streams once copying is finished.public static void copyWithRuntimeExceptionThrowing(InputStream inputStream, OutputStream outputStream)
Copyright © 2019 Atlassian Software Systems Pty Ltd. All rights reserved.