Top Description Constructors Methods
liquibase.util

public abstract Class StreamUtil

extends Object
Class Inheritance
Imports
liquibase.changelog.ChangeSet, liquibase.GlobalConfiguration, liquibase.resource.ResourceAccessor, java.io.*, java.nio.charset.Charset

Utilities for working with streams.

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public static void
copy(InputStream inputStream, OutputStream outputStream)

public static String
public static InputStream
openStream(String path, Boolean relativeToChangelogFile, ChangeSet changeSet, ResourceAccessor resourceAccessor)

public static byte[]
public static String
public static String
readStreamAsString(InputStream stream, String encoding)

Returns the given stream as a string using the given encoding.

public static Reader
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Constructor Detail

StreamUtilback to summary
public StreamUtil()

Method Detail

copyback to summary
public static void copy(InputStream inputStream, OutputStream outputStream) throws IOException
getLineSeparatorback to summary
public static String getLineSeparator()
openStreamback to summary
public static InputStream openStream(String path, Boolean relativeToChangelogFile, ChangeSet changeSet, ResourceAccessor resourceAccessor) throws IOException
readStreamback to summary
public static byte[] readStream(InputStream stream) throws IOException
readStreamAsStringback to summary
public static String readStreamAsString(InputStream stream) throws IOException

Calls readStreamAsString(InputStream, String) with GlobalConfiguration#FILE_ENCODING as the encoding

readStreamAsStringback to summary
public static String readStreamAsString(InputStream stream, String encoding) throws IOException

Returns the given stream as a string using the given encoding. If encoding is null, use GlobalConfiguration#FILE_ENCODING

readStreamWithReaderback to summary
public static Reader readStreamWithReader(InputStream stream, String encoding) throws IOException