public class InputStreamStringBuilderImpl extends Object implements InputStreamStringBuilder
InputStreamStringBuilder
interface. The
InputStream
is not touched earlier than the beginning of the
conversion operation. If no encoding is set, then UTF-8 is used by default.InputStreamAccessor.InputStreamBuilder<B extends InputStreamAccessor.InputStreamBuilder<B>>, InputStreamAccessor.InputStreamMutator, InputStreamAccessor.InputStreamProperty
org.refcodes.mixin.EncodingAccessor.EncodingBuilder<B extends org.refcodes.mixin.EncodingAccessor.EncodingBuilder<B>>, org.refcodes.mixin.EncodingAccessor.EncodingMutator, org.refcodes.mixin.EncodingAccessor.EncodingProperty
Constructor and Description |
---|
InputStreamStringBuilderImpl() |
Modifier and Type | Method and Description |
---|---|
String |
getEncoding() |
InputStream |
getInputStream()
Retrieves the
InputStream from the Input-Stream property. |
void |
setEncoding(String aEncoding) |
void |
setInputStream(InputStream aInputStream)
Sets the
InputStream for the Input-Stream property. |
String |
toString()
Attention: This implementation of the
InputStreamStringBuilder#toString() method throws a
HiddenException (being a sub-class of the
RuntimeException ) in case accessing the InputStream
causes faults. |
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. |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
toString, toStrings, toStrings, toStrings, withEncoding, withInputStream
public String getEncoding()
getEncoding
in interface org.refcodes.mixin.EncodingAccessor
public void setEncoding(String aEncoding)
setEncoding
in interface org.refcodes.mixin.EncodingAccessor.EncodingMutator
public InputStream getInputStream()
InputStreamAccessor
InputStream
from the Input-Stream property.getInputStream
in interface InputStreamAccessor
InputStream
stored by the Input-Stream property.public void setInputStream(InputStream aInputStream)
InputStreamAccessor.InputStreamMutator
InputStream
for the Input-Stream property.setInputStream
in interface InputStreamAccessor.InputStreamMutator
aInputStream
- The InputStream
to be stored by the Input-Stream property.public String toString(InputStream aInputStream, String aEncoding) throws IOException
InputStreamStringBuilder
String
being build by the builder upon the settings of the
attributes.toString
in interface InputStreamStringBuilder
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()
InputStreamStringBuilder#toString()
method throws a
HiddenException
(being a sub-class of the
RuntimeException
) in case accessing the InputStream
causes faults. The cause of the HiddenException
is the
IOException
.
As the toString()
is an Object
's common functionality, I
cannot provide an implementation with a different signature (such as a
throws clause).public String toString(String aEncoding) throws IOException
InputStreamStringBuilder
String
s being build by the builder upon the settings of the
attributes.toString
in interface InputStreamStringBuilder
aEncoding
- The text encoding to be used.String
arrayIOException
- thrown in case accessing the InputStream
caused faults.public String[] toStrings() throws IOException
InputStreamStringBuilder
String
s being build by the builder upon the settings of the
attributes.toStrings
in interface InputStreamStringBuilder
String
arrayIOException
- thrown in case accessing the InputStream
caused faults.Copyright © 2017. All rights reserved.