Package liquibase.util
Class StreamUtil
java.lang.Object
liquibase.util.StreamUtil
Utilities for working with streams.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voidcopy(InputStream inputStream, OutputStream outputStream) Deprecated.static Stringstatic InputStreamopenStream(String path, Boolean relativeToChangelogFile, ChangeSet changeSet, ResourceAccessor resourceAccessor) Deprecated.static byte[]readStream(InputStream stream) Deprecated.useIOUtils.toByteArray(InputStream)static StringreadStreamAsString(InputStream stream) CallsreadStreamAsString(InputStream, String)withGlobalConfiguration.FILE_ENCODINGas the encodingstatic StringreadStreamAsString(InputStream stream, String encoding) Returns the given stream as a string using the given encoding.static ReaderreadStreamWithReader(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_ENCODINGas 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)