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) static Stringstatic InputStreamopenStream(String path, Boolean relativeToChangelogFile, ChangeSet changeSet, ResourceAccessor resourceAccessor) Deprecated.static byte[]readStream(InputStream stream) 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
- Throws:
IOException
-
readStream
- 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
-
ResourceAccessor.openStream(String, String)