Package org.refcodes.io
Class InputStreamStringBuilderImpl
- java.lang.Object
-
- org.refcodes.io.InputStreamStringBuilderImpl
-
- All Implemented Interfaces:
InputStreamAccessor
,InputStreamAccessor.InputStreamBuilder<InputStreamStringBuilder>
,InputStreamAccessor.InputStreamMutator
,InputStreamAccessor.InputStreamProperty
,InputStreamStringBuilder
,org.refcodes.mixin.EncodingAccessor
,org.refcodes.mixin.EncodingAccessor.EncodingBuilder<InputStreamStringBuilder>
,org.refcodes.mixin.EncodingAccessor.EncodingMutator
,org.refcodes.mixin.EncodingAccessor.EncodingProperty
public class InputStreamStringBuilderImpl extends java.lang.Object implements InputStreamStringBuilder
Implementation of theInputStreamStringBuilder
interface. TheInputStream
is not touched earlier than the beginning of the conversion operation. If no encoding is set, then UTF-8 is used by default.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.refcodes.mixin.EncodingAccessor
org.refcodes.mixin.EncodingAccessor.EncodingBuilder<B extends org.refcodes.mixin.EncodingAccessor.EncodingBuilder<B>>, org.refcodes.mixin.EncodingAccessor.EncodingMutator, org.refcodes.mixin.EncodingAccessor.EncodingProperty
-
Nested classes/interfaces inherited from interface org.refcodes.io.InputStreamAccessor
InputStreamAccessor.InputStreamBuilder<B extends InputStreamAccessor.InputStreamBuilder<B>>, InputStreamAccessor.InputStreamMutator, InputStreamAccessor.InputStreamProperty
-
-
Constructor Summary
Constructors Constructor Description InputStreamStringBuilderImpl()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.String
getEncoding()
java.io.InputStream
getInputStream()
Retrieves theInputStream
from the Input-Stream property.void
setEncoding(java.lang.String aEncoding)
void
setInputStream(java.io.InputStream aInputStream)
Sets theInputStream
for the Input-Stream property.java.lang.String
toString()
java.lang.String
toString(java.io.InputStream aInputStream, java.lang.String aEncoding)
TheString
being build by the builder upon the settings of the attributes.java.lang.String
toString(java.lang.String aEncoding)
TheString
s being build by the builder upon the settings of the attributes.java.lang.String[]
toStrings()
TheString
s being build by the builder upon the settings of the attributes.-
Methods inherited from interface org.refcodes.io.InputStreamStringBuilder
toString, toStrings, toStrings, toStrings, withEncoding, withInputStream
-
-
-
-
Method Detail
-
getEncoding
public java.lang.String getEncoding()
- Specified by:
getEncoding
in interfaceorg.refcodes.mixin.EncodingAccessor
-
setEncoding
public void setEncoding(java.lang.String aEncoding)
- Specified by:
setEncoding
in interfaceorg.refcodes.mixin.EncodingAccessor.EncodingMutator
-
getInputStream
public java.io.InputStream getInputStream()
Retrieves theInputStream
from the Input-Stream property.- Specified by:
getInputStream
in interfaceInputStreamAccessor
- Returns:
- The
InputStream
stored by the Input-Stream property.
-
setInputStream
public void setInputStream(java.io.InputStream aInputStream)
Sets theInputStream
for the Input-Stream property.- Specified by:
setInputStream
in interfaceInputStreamAccessor.InputStreamMutator
- Parameters:
aInputStream
- TheInputStream
to be stored by the Input-Stream property.
-
toString
public java.lang.String toString(java.io.InputStream aInputStream, java.lang.String aEncoding) throws java.io.IOException
TheString
being build by the builder upon the settings of the attributes.- Specified by:
toString
in interfaceInputStreamStringBuilder
- Parameters:
aInputStream
- TheInputStream
which to convert into aString
.aEncoding
- The text encoding to be used.- Returns:
- The according resulting
String
- Throws:
java.io.IOException
- thrown in case accessing theInputStream
caused faults.
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
toString
public java.lang.String toString(java.lang.String aEncoding) throws java.io.IOException
TheString
s being build by the builder upon the settings of the attributes.- Specified by:
toString
in interfaceInputStreamStringBuilder
- Parameters:
aEncoding
- The text encoding to be used.- Returns:
- The according resulting
String
array - Throws:
java.io.IOException
- thrown in case accessing theInputStream
caused faults.
-
toStrings
public java.lang.String[] toStrings() throws java.io.IOException
TheString
s being build by the builder upon the settings of the attributes.- Specified by:
toStrings
in interfaceInputStreamStringBuilder
- Returns:
- The according resulting
String
array - Throws:
java.io.IOException
- thrown in case accessing theInputStream
caused faults.
-
-