public class StringInputStreamProvider extends Object implements IHasInputStreamAndReader, IHasReader
InputStream provider based on a String.| Constructor and Description |
|---|
StringInputStreamProvider(char[] aChars,
Charset aCharset) |
StringInputStreamProvider(char[] aChars,
int nOfs,
int nLen,
Charset aCharset) |
StringInputStreamProvider(CharSequence aData,
Charset aCharset) |
StringInputStreamProvider(String sData,
Charset aCharset) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object o) |
Charset |
getCharset() |
String |
getData() |
StringInputStream |
getInputStream()
Get the input stream to read from the object.
|
NonBlockingStringReader |
getReader()
Get the reader to read from the object.
|
NonBlockingStringReader |
getReader(Charset aCharset)
Get a
Reader based on this input stream provider using the given
charset. |
int |
hashCode() |
boolean |
isReadMultiple()
Check if the
InputStream from IHasInputStream.getInputStream() and
IHasInputStream.getBufferedInputStream() can be acquired more than once. |
String |
toString() |
clone, finalize, getClass, notify, notifyAll, wait, wait, waitgetBufferedReadergetBufferedInputStreamgetBufferedReaderpublic StringInputStreamProvider(@Nonnull char[] aChars, @Nonnull Charset aCharset)
public StringInputStreamProvider(@Nonnull char[] aChars, @Nonnegative int nOfs, @Nonnegative int nLen, @Nonnull Charset aCharset)
public StringInputStreamProvider(@Nonnull CharSequence aData, @Nonnull Charset aCharset)
@Nonnull public final StringInputStream getInputStream()
IHasInputStreamInputStream needs to be created.getInputStream in interface IHasInputStreamnull if resolving failed.@Nonnull public final NonBlockingStringReader getReader(@Nonnull Charset aCharset)
IHasInputStreamAndReaderReader based on this input stream provider using the given
charset.getReader in interface IHasInputStreamAndReaderaCharset - The charset to use. May not be null.null if no input stream could be retrieved.@Nonnull public final NonBlockingStringReader getReader()
IHasReaderReader needs to be created!getReader in interface IHasReadernull if resolving failed.public final boolean isReadMultiple()
IHasInputStreamInputStream from IHasInputStream.getInputStream() and
IHasInputStream.getBufferedInputStream() can be acquired more than once.isReadMultiple in interface IHasInputStreamtrue if the input stream can be acquired more than
once, false if not.Copyright © 2014–2022 Philip Helger. All rights reserved.