public abstract static class Streamer.Output
extends Object
Modifier | Constructor and Description |
---|---|
protected |
Output()
Constructs an output.
|
protected |
Output(File file,
Optional<Charset> charset)
Constructs an output.
|
protected |
Output(OutputStream outputStream,
Optional<Charset> charset)
Constructs an output.
|
protected |
Output(Writer writer)
Constructs an output.
|
Modifier and Type | Method and Description |
---|---|
abstract boolean |
add(Serializable serializable)
Adds a serializable.
|
abstract void |
close()
Closes the output.
|
abstract void |
flush()
Flushes the output.
|
protected Optional<Writer> |
getWriter()
Gets the writer.
|
protected boolean |
validate(Serializable serializable)
Validates a serializable.
|
protected Output()
protected Output(@Nonnull Writer writer)
writer
- A writer.protected Output(@Nonnull File file, @Nonnull Optional<Charset> charset) throws FileNotFoundException
file
- An output file.charset
- An optional charset.FileNotFoundException
- When the file is not found.protected Output(@Nonnull OutputStream outputStream, @Nonnull Optional<Charset> charset)
outputStream
- An output stream.charset
- An optional charset.@CheckReturnValue public abstract boolean add(Serializable serializable)
serializable
- The serializable.Streamer.Validated
serializable is invalid.public abstract void close()
public abstract void flush()
@Nonnull @CheckReturnValue protected Optional<Writer> getWriter()
@CheckReturnValue protected boolean validate(Serializable serializable)
serializable
- The serializable.Copyright © 2003-2019 Serge Brisson. All Rights Reserved.