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 theInputStreamStringBuilderinterface. TheInputStreamis 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.StringgetEncoding()java.io.InputStreamgetInputStream()Retrieves theInputStreamfrom the Input-Stream property.voidsetEncoding(java.lang.String aEncoding)voidsetInputStream(java.io.InputStream aInputStream)Sets theInputStreamfor the Input-Stream property.java.lang.StringtoString()java.lang.StringtoString(java.io.InputStream aInputStream, java.lang.String aEncoding)TheStringbeing build by the builder upon the settings of the attributes.java.lang.StringtoString(java.lang.String aEncoding)TheStrings being build by the builder upon the settings of the attributes.java.lang.String[]toStrings()TheStrings 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:
getEncodingin interfaceorg.refcodes.mixin.EncodingAccessor
-
setEncoding
public void setEncoding(java.lang.String aEncoding)
- Specified by:
setEncodingin interfaceorg.refcodes.mixin.EncodingAccessor.EncodingMutator
-
getInputStream
public java.io.InputStream getInputStream()
Retrieves theInputStreamfrom the Input-Stream property.- Specified by:
getInputStreamin interfaceInputStreamAccessor- Returns:
- The
InputStreamstored by the Input-Stream property.
-
setInputStream
public void setInputStream(java.io.InputStream aInputStream)
Sets theInputStreamfor the Input-Stream property.- Specified by:
setInputStreamin interfaceInputStreamAccessor.InputStreamMutator- Parameters:
aInputStream- TheInputStreamto be stored by the Input-Stream property.
-
toString
public java.lang.String toString(java.io.InputStream aInputStream, java.lang.String aEncoding) throws java.io.IOExceptionTheStringbeing build by the builder upon the settings of the attributes.- Specified by:
toStringin interfaceInputStreamStringBuilder- Parameters:
aInputStream- TheInputStreamwhich to convert into aString.aEncoding- The text encoding to be used.- Returns:
- The according resulting
String - Throws:
java.io.IOException- thrown in case accessing theInputStreamcaused faults.
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
toString
public java.lang.String toString(java.lang.String aEncoding) throws java.io.IOExceptionTheStrings being build by the builder upon the settings of the attributes.- Specified by:
toStringin interfaceInputStreamStringBuilder- Parameters:
aEncoding- The text encoding to be used.- Returns:
- The according resulting
Stringarray - Throws:
java.io.IOException- thrown in case accessing theInputStreamcaused faults.
-
toStrings
public java.lang.String[] toStrings() throws java.io.IOExceptionTheStrings being build by the builder upon the settings of the attributes.- Specified by:
toStringsin interfaceInputStreamStringBuilder- Returns:
- The according resulting
Stringarray - Throws:
java.io.IOException- thrown in case accessing theInputStreamcaused faults.
-
-