public final class Strings extends Object
Modifier and Type | Method and Description |
---|---|
static io.reactivex.functions.Function<io.reactivex.Flowable<String>,io.reactivex.Maybe<String>> |
concat() |
static io.reactivex.Maybe<String> |
concat(io.reactivex.Flowable<String> source) |
static io.reactivex.Maybe<String> |
concat(io.reactivex.Flowable<String> source,
String delimiter) |
static io.reactivex.functions.Function<io.reactivex.Flowable<String>,io.reactivex.Maybe<String>> |
concat(String delimiter) |
static io.reactivex.FlowableTransformer<byte[],String> |
decode(CharsetDecoder decoder) |
static io.reactivex.FlowableTransformer<byte[],String> |
decode(CharsetDecoder decoder,
io.reactivex.BackpressureStrategy backpressureStrategy,
int requestBatchSize) |
static io.reactivex.Flowable<String> |
decode(io.reactivex.Flowable<byte[]> source,
Charset charset) |
static io.reactivex.Flowable<String> |
decode(io.reactivex.Flowable<byte[]> source,
CharsetDecoder decoder) |
static io.reactivex.Flowable<String> |
decode(io.reactivex.Flowable<byte[]> source,
String charset) |
static io.reactivex.Flowable<String> |
from(Callable<Reader> readerFactory) |
static io.reactivex.Flowable<String> |
from(File file) |
static io.reactivex.Flowable<String> |
from(File file,
Charset charset) |
static io.reactivex.Flowable<String> |
from(InputStream is) |
static io.reactivex.Flowable<String> |
from(InputStream is,
Charset charset) |
static io.reactivex.Flowable<String> |
from(InputStream is,
Charset charset,
int bufferSize) |
static io.reactivex.Flowable<String> |
from(Reader reader) |
static io.reactivex.Flowable<String> |
from(Reader reader,
int bufferSize) |
static io.reactivex.Flowable<String> |
fromClasspath(Class<?> cls,
String resource,
Charset charset) |
static io.reactivex.Flowable<String> |
fromClasspath(String resource) |
static io.reactivex.Flowable<String> |
fromClasspath(String resource,
Charset charset) |
static io.reactivex.functions.Function<io.reactivex.Flowable<String>,io.reactivex.Maybe<String>> |
join() |
static io.reactivex.Maybe<String> |
join(io.reactivex.Flowable<String> source) |
static io.reactivex.Maybe<String> |
join(io.reactivex.Flowable<String> source,
String delimiter) |
static io.reactivex.functions.Function<io.reactivex.Flowable<String>,io.reactivex.Maybe<String>> |
join(String delimiter) |
static io.reactivex.Flowable<String> |
split(io.reactivex.Flowable<String> source,
String pattern) |
static io.reactivex.FlowableTransformer<String,String> |
split(Pattern pattern) |
static io.reactivex.FlowableTransformer<String,String> |
split(Pattern pattern,
io.reactivex.BackpressureStrategy backpressureStrategy,
int batchSize) |
static io.reactivex.FlowableTransformer<String,String> |
split(String pattern) |
static io.reactivex.FlowableTransformer<String,String> |
split(String pattern,
io.reactivex.BackpressureStrategy backpressureStrategy,
int requestBatchSize) |
static io.reactivex.Flowable<List<String>> |
splitLinesSkipComments(InputStream is,
Charset charset,
String delimiter,
String commentPrefix) |
static <T> io.reactivex.FlowableTransformer<String,String> |
splitSimple(String delimiter)
Splits on a string delimiter, not a pattern.
|
static <T> io.reactivex.FlowableTransformer<T,String> |
strings() |
static io.reactivex.Flowable<String> |
strings(io.reactivex.Flowable<?> source) |
static InputStream |
toInputStream(org.reactivestreams.Publisher<String> publisher)
Returns an
InputStream that offers the concatenated String data
emitted by a subscription to the given publisher using the character set
UTF-8 for the bytes read through the InputStream. |
static InputStream |
toInputStream(org.reactivestreams.Publisher<String> publisher,
Charset charset)
Returns an
InputStream that offers the concatenated String data
emitted by a subscription to the given publisher using the given character set. |
static <T> io.reactivex.functions.Function<T,String> |
trim() |
public static final Charset UTF_8
public static <T> io.reactivex.functions.Function<T,String> trim()
public static io.reactivex.Flowable<String> from(InputStream is)
public static io.reactivex.Flowable<String> from(InputStream is, Charset charset)
public static io.reactivex.Flowable<String> from(InputStream is, Charset charset, int bufferSize)
public static io.reactivex.Flowable<String> split(io.reactivex.Flowable<String> source, String pattern)
public static io.reactivex.Maybe<String> concat(io.reactivex.Flowable<String> source, String delimiter)
public static io.reactivex.Flowable<String> strings(io.reactivex.Flowable<?> source)
public static io.reactivex.Flowable<String> fromClasspath(Class<?> cls, String resource, Charset charset)
public static io.reactivex.Flowable<String> fromClasspath(String resource, Charset charset)
public static io.reactivex.FlowableTransformer<byte[],String> decode(CharsetDecoder decoder)
public static io.reactivex.FlowableTransformer<byte[],String> decode(CharsetDecoder decoder, io.reactivex.BackpressureStrategy backpressureStrategy, int requestBatchSize)
public static io.reactivex.Flowable<String> decode(io.reactivex.Flowable<byte[]> source, CharsetDecoder decoder)
public static io.reactivex.Flowable<String> decode(io.reactivex.Flowable<byte[]> source, Charset charset)
public static io.reactivex.Flowable<String> decode(io.reactivex.Flowable<byte[]> source, String charset)
public static io.reactivex.Maybe<String> join(io.reactivex.Flowable<String> source, String delimiter)
public static io.reactivex.Flowable<List<String>> splitLinesSkipComments(InputStream is, Charset charset, String delimiter, String commentPrefix)
public static io.reactivex.FlowableTransformer<String,String> split(String pattern, io.reactivex.BackpressureStrategy backpressureStrategy, int requestBatchSize)
public static io.reactivex.FlowableTransformer<String,String> split(Pattern pattern, io.reactivex.BackpressureStrategy backpressureStrategy, int batchSize)
public static io.reactivex.functions.Function<io.reactivex.Flowable<String>,io.reactivex.Maybe<String>> join(String delimiter)
public static io.reactivex.functions.Function<io.reactivex.Flowable<String>,io.reactivex.Maybe<String>> join()
public static io.reactivex.functions.Function<io.reactivex.Flowable<String>,io.reactivex.Maybe<String>> concat(String delimiter)
public static io.reactivex.functions.Function<io.reactivex.Flowable<String>,io.reactivex.Maybe<String>> concat()
public static <T> io.reactivex.FlowableTransformer<T,String> strings()
public static <T> io.reactivex.FlowableTransformer<String,String> splitSimple(String delimiter)
.take(), .takeUntil(), elementAt()
.
Benchmark Mode Cnt Score Error Units Benchmarks.splitRxJavaString thrpt 10 983.128 ± 23.833 ops/s Benchmarks.splitRxJavaStringTake5 thrpt 10 1033.090 ± 33.083 ops/s Benchmarks.splitSimple thrpt 10 113.727 ± 2.122 ops/s Benchmarks.splitSimpleTake5 thrpt 10 867527.265 ± 27168.498 ops/s Benchmarks.splitStandard thrpt 10 108.880 ± 4.428 ops/s Benchmarks.splitStandardTake5 thrpt 10 1217.798 ± 44.237 ops/s Benchmarks.splitStandardWithPattern thrpt 10 102.882 ± 5.083 ops/s Benchmarks.splitStandardWithPatternTake5 thrpt 10 1054.024 ± 27.906 ops/s
T
- type being streameddelimiter
- string delimiterpublic static InputStream toInputStream(org.reactivestreams.Publisher<String> publisher, Charset charset)
InputStream
that offers the concatenated String data
emitted by a subscription to the given publisher using the given character set.publisher
- the source of the String datacharset
- the character set of the bytes to be read in the InputStreampublic static InputStream toInputStream(org.reactivestreams.Publisher<String> publisher)
InputStream
that offers the concatenated String data
emitted by a subscription to the given publisher using the character set
UTF-8 for the bytes read through the InputStream.publisher
- the source of the String dataCopyright © 2013–2020. All rights reserved.