Skip to content

Commit

Permalink
Adding marble diagrams to StringObservable operator javadocs
Browse files Browse the repository at this point in the history
  • Loading branch information
DavidMGross committed May 14, 2014
1 parent 50b618e commit d9c086f
Showing 1 changed file with 28 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,8 @@ public class StringObservable {
/**
* Reads from the bytes from a source {@link InputStream} and outputs {@link Observable} of
* {@code byte[]}s
* <p>
* <img width="640" src="https://raw.github.com/wiki/Netflix/RxJava/images/rx-operators/St.from.png">
*
* @param i
* Source {@link InputStream}
Expand All @@ -52,6 +54,8 @@ public static Observable<byte[]> from(final InputStream i) {
/**
* Reads from the bytes from a source {@link InputStream} and outputs {@link Observable} of
* {@code byte[]}s
* <p>
* <img width="640" src="https://raw.github.com/wiki/Netflix/RxJava/images/rx-operators/St.from.png">
*
* @param i
* Source {@link InputStream}
Expand Down Expand Up @@ -86,6 +90,8 @@ public void call(Subscriber<? super byte[]> o) {
/**
* Reads from the characters from a source {@link Reader} and outputs {@link Observable} of
* {@link String}s
* <p>
* <img width="640" src="https://raw.github.com/wiki/Netflix/RxJava/images/rx-operators/St.from.png">
*
* @param i
* Source {@link Reader}
Expand All @@ -98,6 +104,8 @@ public static Observable<String> from(final Reader i) {
/**
* Reads from the characters from a source {@link Reader} and outputs {@link Observable} of
* {@link String}s
* <p>
* <img width="640" src="https://raw.github.com/wiki/Netflix/RxJava/images/rx-operators/St.from.png">
*
* @param i
* Source {@link Reader}
Expand Down Expand Up @@ -132,6 +140,8 @@ public void call(Subscriber<? super String> o) {
/**
* Decodes a stream the multibyte chunks into a stream of strings that works on infinite streams
* and where handles when a multibyte character spans two chunks.
* <p>
* <img width="640" src="https://raw.github.com/wiki/Netflix/RxJava/images/rx-operators/St.decode.png">
*
* @param src
* @param charsetName
Expand All @@ -144,6 +154,8 @@ public static Observable<String> decode(Observable<byte[]> src, String charsetNa
/**
* Decodes a stream the multibyte chunks into a stream of strings that works on infinite streams
* and where handles when a multibyte character spans two chunks.
* <p>
* <img width="640" src="https://raw.github.com/wiki/Netflix/RxJava/images/rx-operators/St.decode.png">
*
* @param src
* @param charset
Expand All @@ -157,6 +169,8 @@ public static Observable<String> decode(Observable<byte[]> src, Charset charset)
* Decodes a stream the multibyte chunks into a stream of strings that works on infinite streams
* and where it handles when a multibyte character spans two chunks.
* This method allows for more control over how malformed and unmappable characters are handled.
* <p>
* <img width="640" src="https://raw.github.com/wiki/Netflix/RxJava/images/rx-operators/St.decode.png">
*
* @param src
* @param charsetDecoder
Expand Down Expand Up @@ -246,6 +260,8 @@ public boolean process(byte[] next, ByteBuffer last, boolean endOfInput) {

/**
* Encodes a possible infinite stream of strings into a Observable of byte arrays.
* <p>
* <img width="640" src="https://raw.github.com/wiki/Netflix/RxJava/images/rx-operators/St.encode.png">
*
* @param src
* @param charsetName
Expand All @@ -257,6 +273,8 @@ public static Observable<byte[]> encode(Observable<String> src, String charsetNa

/**
* Encodes a possible infinite stream of strings into a Observable of byte arrays.
* <p>
* <img width="640" src="https://raw.github.com/wiki/Netflix/RxJava/images/rx-operators/St.encode.png">
*
* @param src
* @param charset
Expand All @@ -269,6 +287,8 @@ public static Observable<byte[]> encode(Observable<String> src, Charset charset)
/**
* Encodes a possible infinite stream of strings into a Observable of byte arrays.
* This method allows for more control over how malformed and unmappable characters are handled.
* <p>
* <img width="640" src="https://raw.github.com/wiki/Netflix/RxJava/images/rx-operators/St.encode.png">
*
* @param src
* @param charsetEncoder
Expand All @@ -293,6 +313,8 @@ public byte[] call(String str) {
/**
* Gather up all of the strings in to one string to be able to use it as one message. Don't use
* this on infinite streams.
* <p>
* <img width="640" src="https://raw.github.com/wiki/Netflix/RxJava/images/rx-operators/St.stringConcat.png">
*
* @param src
* @return the Observable returing all strings concatenated as a single string
Expand All @@ -315,6 +337,8 @@ public String call(String a, String b) {
* </pre>
*
* See {@link Pattern}
* <p>
* <img width="640" src="https://raw.github.com/wiki/Netflix/RxJava/images/rx-operators/St.split.png">
*
* @param src
* @param regex
Expand Down Expand Up @@ -384,6 +408,8 @@ private void output(String part) {
* Concatenates the sequence of values by adding a separator
* between them and emitting the result once the source completes.
* <p>
* <img width="640" src="https://raw.github.com/wiki/Netflix/RxJava/images/rx-operators/St.join.png">
* <p>
* The conversion from the value type to String is performed via
* {@link java.lang.String#valueOf(java.lang.Object)} calls.
* <p>
Expand Down Expand Up @@ -487,6 +513,8 @@ public String toString() {

/**
* Splits the {@link Observable} of Strings by lines and numbers them (zero based index)
* <p>
* <img width="640" src="https://raw.github.com/wiki/Netflix/RxJava/images/rx-operators/St.byLine.png">
*
* @param source
* @return the Observable conaining the split lines of the source
Expand Down

0 comments on commit d9c086f

Please sign in to comment.