org.refcodes.mixin.EncodingAccessor<InputStreamStringBuilder>
, org.refcodes.mixin.EncodingAccessor.EncodingBuilder<String,InputStreamStringBuilder>
, org.refcodes.mixin.EncodingAccessor.EncodingMutator<InputStreamStringBuilder>
, org.refcodes.mixin.EncodingAccessor.EncodingProperty<String>
, org.refcodes.mixin.InputStreamAccessor
, org.refcodes.mixin.InputStreamAccessor.InputStreamBuilder<InputStreamStringBuilder>
, org.refcodes.mixin.InputStreamAccessor.InputStreamMutator
, org.refcodes.mixin.InputStreamAccessor.InputStreamProperty
public class InputStreamStringBuilder extends Object implements org.refcodes.mixin.InputStreamAccessor.InputStreamProperty, org.refcodes.mixin.InputStreamAccessor.InputStreamBuilder<InputStreamStringBuilder>, org.refcodes.mixin.EncodingAccessor.EncodingProperty<String>, org.refcodes.mixin.EncodingAccessor.EncodingBuilder<String,InputStreamStringBuilder>
InputStreamStringBuilder
constructs String
instances from
InputStream
instances. Either use
setInputStream(InputStream)
(withInputStream(InputStream)
)
followed by a Object.toString()
method (not thread safe) or directly
call toString(InputStream)
(thread safe). You may specify an
encoding to be used such as UTF-8 by either setting the encoding attribute
with EncodingAccessor.EncodingMutator.setEncoding(Object)
(withEncoding(String)
) or by
passing the encoding to the conversion method as of toString(String)
which overrules the encoding attribute.org.refcodes.mixin.EncodingAccessor.EncodingBuilder<E extends Object,B extends org.refcodes.mixin.EncodingAccessor.EncodingBuilder<E,B>>, org.refcodes.mixin.EncodingAccessor.EncodingMutator<E extends Object>, org.refcodes.mixin.EncodingAccessor.EncodingProperty<E extends Object>
org.refcodes.mixin.InputStreamAccessor.InputStreamBuilder<B extends org.refcodes.mixin.InputStreamAccessor.InputStreamBuilder<?>>, org.refcodes.mixin.InputStreamAccessor.InputStreamMutator, org.refcodes.mixin.InputStreamAccessor.InputStreamProperty
Constructor | Description |
---|---|
InputStreamStringBuilder() |
Modifier and Type | Method | Description |
---|---|---|
String |
getEncoding() |
|
InputStream |
getInputStream() |
|
void |
setEncoding(String aEncoding) |
|
void |
setInputStream(InputStream aInputStream) |
|
String |
toString() |
|
String |
toString(InputStream aInputStream) |
The
String being build by the builder upon the settings of the
attributes. |
String |
toString(InputStream aInputStream,
String aEncoding) |
The
String being build by the builder upon the settings of the
attributes. |
String |
toString(String aEncoding) |
The
String s being build by the builder upon the settings of the
attributes. |
String[] |
toStrings() |
The
String s being build by the builder upon the settings of the
attributes. |
String[] |
toStrings(InputStream aInputStream) |
The
String s being build by the builder upon the settings of the
attributes. |
String[] |
toStrings(InputStream aInputStream,
String aEncoding) |
The
String s being build by the builder upon the settings of the
attributes. |
String[] |
toStrings(String aEncoding) |
The
String s being build by the builder upon the settings of the
attributes. |
InputStreamStringBuilder |
withEncoding(String aEncoding) |
|
InputStreamStringBuilder |
withInputStream(InputStream aInputStream) |
public InputStreamStringBuilder withEncoding(String aEncoding)
withEncoding
in interface org.refcodes.mixin.EncodingAccessor.EncodingBuilder<String,InputStreamStringBuilder>
public InputStreamStringBuilder withInputStream(InputStream aInputStream)
withInputStream
in interface org.refcodes.mixin.InputStreamAccessor.InputStreamBuilder<InputStreamStringBuilder>
public String toString(InputStream aInputStream) throws IOException
String
being build by the builder upon the settings of the
attributes.aInputStream
- The InputStream
which to convert into a
String
.String
IOException
- thrown in case accessing the InputStream
caused faults.public String[] toStrings(InputStream aInputStream) throws IOException
String
s being build by the builder upon the settings of the
attributes.aInputStream
- The InputStream
which to convert into a
String
array.String
arrayIOException
- thrown in case accessing the InputStream
caused faults.public String getEncoding()
getEncoding
in interface org.refcodes.mixin.EncodingAccessor<InputStreamStringBuilder>
public void setEncoding(String aEncoding)
setEncoding
in interface org.refcodes.mixin.EncodingAccessor.EncodingMutator<InputStreamStringBuilder>
public InputStream getInputStream()
getInputStream
in interface org.refcodes.mixin.InputStreamAccessor
public void setInputStream(InputStream aInputStream)
setInputStream
in interface org.refcodes.mixin.InputStreamAccessor.InputStreamMutator
public String toString(InputStream aInputStream, String aEncoding) throws IOException
String
being build by the builder upon the settings of the
attributes.aInputStream
- The InputStream
which to convert into a
String
.aEncoding
- The text encoding to be used.String
IOException
- thrown in case accessing the InputStream
caused faults.public String toString(String aEncoding) throws IOException
String
s being build by the builder upon the settings of the
attributes.aEncoding
- The text encoding to be used.String
arrayIOException
- thrown in case accessing the InputStream
caused faults.public String[] toStrings() throws IOException
String
s being build by the builder upon the settings of the
attributes.String
arrayIOException
- thrown in case accessing the InputStream
caused faults.public String[] toStrings(String aEncoding) throws IOException
String
s being build by the builder upon the settings of the
attributes.aEncoding
- The text encoding to be used.String
arrayIOException
- thrown in case accessing the InputStream
caused faults.public String[] toStrings(InputStream aInputStream, String aEncoding) throws IOException
String
s being build by the builder upon the settings of the
attributes.aInputStream
- The InputStream
which to convert into a
String
array.aEncoding
- The text encoding to be used.String
arrayIOException
- thrown in case accessing the InputStream
caused faults.Copyright © 2021. All rights reserved.