public final class Serialized extends Object
Flowable streams to
ObjectOutputStreams and reading Flowable streams of
indeterminate size from ObjectInputStreams.| Modifier and Type | Class and Description |
|---|---|
static class |
Serialized.KryoBuilder |
| Modifier and Type | Method and Description |
|---|---|
static Serialized.KryoBuilder |
kryo() |
static Serialized.KryoBuilder |
kryo(com.esotericsoftware.kryo.Kryo kryo) |
static <T extends Serializable> |
read(File file)
Returns the deserialized objects from the given
File as a
Flowable stream. |
static <T extends Serializable> |
read(File file,
int bufferSize)
Returns the deserialized objects from the given
File as a
Flowable stream. |
static <T extends Serializable> |
read(ObjectInputStream ois)
Returns the deserialized objects from the given
InputStream as a
Flowable stream. |
static <T extends Serializable> |
write(io.reactivex.Flowable<T> source,
File file)
Writes the source stream to the given file in given append mode and using
the a buffer size of 8192 bytes.
|
static <T extends Serializable> |
write(io.reactivex.Flowable<T> source,
File file,
boolean append)
Writes the source stream to the given file in given append mode and using
the a buffer size of 8192 bytes.
|
static <T extends Serializable> |
write(io.reactivex.Flowable<T> source,
File file,
boolean append,
int bufferSize)
Writes the source stream to the given file in given append mode and using
the given buffer size.
|
static <T extends Serializable> |
write(io.reactivex.Flowable<T> source,
ObjectOutputStream oos)
Returns a duplicate of the input stream but with the side effect that
emissions from the source are written to the
ObjectOutputStream. |
public static <T extends Serializable> io.reactivex.Flowable<T> read(ObjectInputStream ois)
InputStream as a
Flowable stream.T - the generic type of the returned streamois - the ObjectInputStreamInputStream
as an Flowable.public static <T extends Serializable> io.reactivex.Flowable<T> read(File file, int bufferSize)
File as a
Flowable stream. Uses buffer of size bufferSize
buffer reads from the File.T - the generic type of the deserialized objects returned in the
streamfile - the input filebufferSize - the buffer size for reading bytes from the file.InputStream
as a Flowable.public static <T extends Serializable> io.reactivex.Flowable<T> read(File file)
File as a
Flowable stream. A buffer size of 8192 bytes is used by default.T - the generic type of the deserialized objects returned in the
streamfile - the input file containing serialized java objectsInputStream
as an Flowable.public static <T extends Serializable> io.reactivex.Flowable<T> write(io.reactivex.Flowable<T> source, ObjectOutputStream oos)
ObjectOutputStream.T - the generic type of the objects being serializedsource - the source of objects to writeoos - the output stream to write topublic static <T extends Serializable> io.reactivex.Flowable<T> write(io.reactivex.Flowable<T> source, File file, boolean append, int bufferSize)
T - the generic type of the input streamsource - flowable stream to writefile - file to write toappend - if true writes are appended to file otherwise overwrite the
filebufferSize - the buffer size in bytes to use.public static <T extends Serializable> io.reactivex.Flowable<T> write(io.reactivex.Flowable<T> source, File file, boolean append)
T - the generic type of the input streamsource - flowable stream to writefile - file to write toappend - if true writes are appended to file otherwise overwrite the
filepublic static <T extends Serializable> io.reactivex.Flowable<T> write(io.reactivex.Flowable<T> source, File file)
T - the generic type of the input streamsource - flowable stream to writefile - file to write topublic static Serialized.KryoBuilder kryo()
public static Serialized.KryoBuilder kryo(com.esotericsoftware.kryo.Kryo kryo)
Copyright © 2013–2020. All rights reserved.