Package liquibase.resource
Class InputStreamList
- java.lang.Object
-
- liquibase.resource.InputStreamList
-
- All Implemented Interfaces:
AutoCloseable
,Iterable<InputStream>
public class InputStreamList extends Object implements Iterable<InputStream>, AutoCloseable
A list ofInputStream
s. Custom class to allow try-with-resources using output fromResourceAccessor.openStreams(String, String)
.
-
-
Constructor Summary
Constructors Constructor Description InputStreamList()
InputStreamList(URI uri, InputStream stream)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
add(URI uri, InputStream inputStream)
void
addAll(InputStreamList streams)
protected boolean
alreadySaw(URI uri)
void
close()
Close the streams in this collection.void
forEach(Consumer<? super InputStream> action)
List<URI>
getURIs()
boolean
isEmpty()
Iterator<InputStream>
iterator()
int
size()
Spliterator<InputStream>
spliterator()
-
-
-
Constructor Detail
-
InputStreamList
public InputStreamList()
-
InputStreamList
public InputStreamList(URI uri, InputStream stream)
-
-
Method Detail
-
add
public boolean add(URI uri, InputStream inputStream)
-
alreadySaw
protected boolean alreadySaw(URI uri)
-
addAll
public void addAll(InputStreamList streams)
-
close
public void close() throws IOException
Close the streams in this collection.- Specified by:
close
in interfaceAutoCloseable
- Throws:
IOException
-
iterator
public Iterator<InputStream> iterator()
- Specified by:
iterator
in interfaceIterable<InputStream>
-
forEach
public void forEach(Consumer<? super InputStream> action)
- Specified by:
forEach
in interfaceIterable<InputStream>
-
spliterator
public Spliterator<InputStream> spliterator()
- Specified by:
spliterator
in interfaceIterable<InputStream>
-
size
public int size()
-
isEmpty
public boolean isEmpty()
-
-