Package liquibase.util
Class StreamUtil
java.lang.Object
liquibase.util.StreamUtil
Utilities for working with streams.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic void
copy
(InputStream inputStream, OutputStream outputStream) Deprecated.static String
static InputStream
openStream
(String path, Boolean relativeToChangelogFile, ChangeSet changeSet, ResourceAccessor resourceAccessor) Deprecated.static byte[]
readStream
(InputStream stream) Deprecated.useIOUtils.toByteArray(InputStream)
static String
readStreamAsString
(InputStream stream) CallsreadStreamAsString(InputStream, String)
withGlobalConfiguration.FILE_ENCODING
as the encodingstatic String
readStreamAsString
(InputStream stream, String encoding) Returns the given stream as a string using the given encoding.static Reader
readStreamWithReader
(InputStream stream, String encoding)
-
Constructor Details
-
StreamUtil
public StreamUtil()
-
-
Method Details
-
getLineSeparator
-
copy
@Deprecated public static void copy(InputStream inputStream, OutputStream outputStream) throws IOException Deprecated.useIOUtils.copy(InputStream, OutputStream)
- Throws:
IOException
-
readStream
Deprecated.useIOUtils.toByteArray(InputStream)
- Throws:
IOException
-
readStreamAsString
CallsreadStreamAsString(InputStream, String)
withGlobalConfiguration.FILE_ENCODING
as the encoding- Throws:
IOException
-
readStreamAsString
Returns the given stream as a string using the given encoding. If encoding is null, useGlobalConfiguration.FILE_ENCODING
- Throws:
IOException
-
readStreamWithReader
- Throws:
IOException
-
openStream
@Deprecated public static InputStream openStream(String path, Boolean relativeToChangelogFile, ChangeSet changeSet, ResourceAccessor resourceAccessor) throws IOException Deprecated.- Throws:
IOException
-
IOUtils.copy(InputStream, OutputStream)