public final class Serialized extends Object
Modifier and Type | Class and Description |
---|---|
static class |
Serialized.KryoBuilder |
Constructor and Description |
---|
Serialized() |
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 an
Observable stream. |
static <T extends Serializable> |
read(File file,
int bufferSize)
Returns the deserialized objects from the given
File as an
Observable stream. |
static <T extends Serializable> |
read(ObjectInputStream ois)
Returns the deserialized objects from the given
InputStream as an
Observable stream. |
static <T extends Serializable> |
write(rx.Observable<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(rx.Observable<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(rx.Observable<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(rx.Observable<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> rx.Observable<T> read(ObjectInputStream ois)
InputStream
as an
Observable
stream.T
- the generic type of the returned streamois
- the ObjectInputStream
InputStream
as an Observable
.public static <T extends Serializable> rx.Observable<T> read(File file, int bufferSize)
File
as an
Observable
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 an Observable
.public static <T extends Serializable> rx.Observable<T> read(File file)
File
as an
Observable
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 Observable
.public static <T extends Serializable> rx.Observable<T> write(rx.Observable<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> rx.Observable<T> write(rx.Observable<T> source, File file, boolean append, int bufferSize)
T
- the generic type of the input streamsource
- observable 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> rx.Observable<T> write(rx.Observable<T> source, File file, boolean append)
T
- the generic type of the input streamsource
- observable stream to writefile
- file to write toappend
- if true writes are appended to file otherwise overwrite the
filepublic static <T extends Serializable> rx.Observable<T> write(rx.Observable<T> source, File file)
T
- the generic type of the input streamsource
- observable stream to writefile
- file to write topublic static Serialized.KryoBuilder kryo()
public static Serialized.KryoBuilder kryo(com.esotericsoftware.kryo.Kryo kryo)
Copyright © 2013–2016. All rights reserved.