public class Streamables extends Object
Streamable
instances.Constructor and Description |
---|
Streamables() |
Modifier and Type | Method and Description |
---|---|
static Streamable |
combine(Iterable<Streamable> streamables)
Combine a series of streamable instances into a single result.
|
static Streamable |
combine(Streamable... streamables)
Combine a series of streamable instances into a single result.
|
static Streamable |
empty()
Create an empty streamable that will do nothing when its
writeTo() method is called. |
static Streamable |
from(String source)
Produce a streamable from a string.
|
static Streamable |
from(XmlStreamWriterTemplate template,
XmlStreamWriterCallback callback)
Create a streamable that will produce the result of executing the provide callback within the template.
|
static Streamable |
withCharacterCounting(Streamable delegate,
com.atlassian.fugue.Effect<Long> characterCountCallback)
Deprecated.
since 7.0.1. Use
withCountingCharacters(Streamable, Consumer) |
static Streamable |
withCountingCharacters(Streamable delegate,
Consumer<Long> characterCountCallback)
Produces a Streamable which counts the number of characters written to another Streamable's writer.
|
static String |
writeToString(Streamable streamable)
Write the contents of a streamable to a string.
|
public static Streamable from(String source)
source
- the string that needs to be streamedpublic static Streamable combine(Streamable... streamables)
streamables
- the streamables that are to be combined.public static Streamable combine(Iterable<Streamable> streamables)
streamables
- the streamables that are to be combined.public static Streamable from(XmlStreamWriterTemplate template, XmlStreamWriterCallback callback)
writeTo
method is called.template
- the template in which to execute the callbackcallback
- the callback to executepublic static Streamable empty()
writeTo()
method is called.public static String writeToString(Streamable streamable)
streamable
- the streamable to write@Deprecated public static Streamable withCharacterCounting(Streamable delegate, com.atlassian.fugue.Effect<Long> characterCountCallback)
withCountingCharacters(Streamable, Consumer)
delegate
- The streamable to be wrappedcharacterCountCallback
- The callback for receiving the character countpublic static Streamable withCountingCharacters(Streamable delegate, Consumer<Long> characterCountCallback)
delegate
- The streamable to be wrappedcharacterCountCallback
- The callback for receiving the character countCopyright © 2003–2020 Atlassian. All rights reserved.