Top Description Fields Constructors Methods
liquibase.resource

public Class InputStreamList

extends Object
implements Iterable<InputStream>, AutoCloseable
Class Inheritance
All Implemented Interfaces
java.lang.AutoCloseable, java.lang.Iterable
Imports
liquibase.Scope, liquibase.logging.Logger, java.io.IOException, .InputStream, java.net.URI, java.util.*, java.util.function.Consumer

A list of InputStreams. Custom class to allow try-with-resources using output from ResourceAccessor#openStreams(String, String).

Field Summary

Modifier and TypeField and Description
private final LinkedHashMap<URI, InputStream>

Constructor Summary

AccessConstructor and Description
public
public

Method Summary

Modifier and TypeMethod and Description
public boolean
add(URI uri, InputStream inputStream)

public void
protected boolean
public void
close()

Implements java.lang.AutoCloseable.close.

Close the streams in this collection.

public void
forEach(Consumer<? super InputStream>
The action to be performed for each element
action
)

Overrides default java.lang.Iterable.forEach.

Performs the given action for each element of the Iterable until all elements have been processed or the action throws an exception.

public List<URI>
public boolean
public Iterator<InputStream>
iterator()

Implements java.lang.Iterable.iterator.

Returns an iterator over elements of type T.

public int
size()

public Spliterator<InputStream>
spliterator()

Overrides default java.lang.Iterable.spliterator.

Creates a Spliterator over the elements described by this Iterable.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

streamsback to summary
private final LinkedHashMap<URI, InputStream> streams

Constructor Detail

InputStreamListback to summary
public InputStreamList()
InputStreamListback to summary
public InputStreamList(URI uri, InputStream stream)

Method Detail

addback to summary
public boolean add(URI uri, InputStream inputStream)
addAllback to summary
public void addAll(InputStreamList streams)
alreadySawback to summary
protected boolean alreadySaw(URI uri)
closeback to summary
public void close() throws IOException

Implements java.lang.AutoCloseable.close.

Close the streams in this collection.

Annotations
@Override
forEachback to summary
public void forEach(Consumer<? super InputStream> action)

Overrides default java.lang.Iterable.forEach.

Doc from java.lang.Iterable.forEach.

Performs the given action for each element of the Iterable until all elements have been processed or the action throws an exception. Actions are performed in the order of iteration, if that order is specified. Exceptions thrown by the action are relayed to the caller.

The behavior of this method is unspecified if the action performs side-effects that modify the underlying source of elements, unless an overriding class has specified a concurrent modification policy.

Parameters
action:Consumer<? super InputStream>

The action to be performed for each element

Annotations
@Override
getURIsback to summary
public List<URI> getURIs()
isEmptyback to summary
public boolean isEmpty()
iteratorback to summary
public Iterator<InputStream> iterator()

Implements java.lang.Iterable.iterator.

Doc from java.lang.Iterable.iterator.

Returns an iterator over elements of type T.

Returns:Iterator<InputStream>

an Iterator.

Annotations
@Override
sizeback to summary
public int size()
spliteratorback to summary
public Spliterator<InputStream> spliterator()

Overrides default java.lang.Iterable.spliterator.

Doc from java.lang.Iterable.spliterator.

Creates a Spliterator over the elements described by this Iterable.

Returns:Spliterator<InputStream>

a Spliterator over the elements described by this Iterable.

Annotations
@Override