public class ByteArrayOutputStreamProvider extends Object implements IHasOutputStreamAndWriter, Serializable
OutputStream provider based on a byte array.| Constructor and Description |
|---|
ByteArrayOutputStreamProvider() |
| Modifier and Type | Method and Description |
|---|---|
String |
getAsString(Charset aCharset) |
byte[] |
getBytes() |
NonBlockingByteArrayOutputStream |
getOutputStream(EAppend eAppend)
Get the output stream to read from the object.
|
OutputStreamWriter |
getWriter(Charset aCharset,
EAppend eAppend)
Get an
Writer based on this output stream provider using the given
charset. |
String |
toString() |
@Nonnull public final NonBlockingByteArrayOutputStream getOutputStream(@Nonnull EAppend eAppend)
IHasOutputStreamOutputStream needs to be created!getOutputStream in interface IHasOutputStreameAppend - appending mode. May not be null.null if resolving failed.@Nonnull public final OutputStreamWriter getWriter(@Nonnull Charset aCharset, @Nonnull EAppend eAppend)
IHasOutputStreamAndWriterWriter based on this output stream provider using the given
charset.getWriter in interface IHasOutputStreamAndWriteraCharset - The charset to use. May not be null.eAppend - Appending mode. May not be null.null if no output stream could be retrieved.@Nonnull @ReturnsMutableCopy public byte[] getBytes()
Copyright © 2014–2016 Philip Helger. All rights reserved.