Class CharSequenceInputStream.Builder

All Implemented Interfaces:
IOSupplier<CharSequenceInputStream>
Enclosing class:
CharSequenceInputStream

Builds a new CharSequenceInputStream.

For example:

Using a Charset


 CharSequenceInputStream s = CharSequenceInputStream.builder()
   .setBufferSize(8192)
   .setCharSequence("String")
   .setCharset(Charset.defaultCharset())
   .get();
 

Using a CharsetEncoder


 CharSequenceInputStream s = CharSequenceInputStream.builder()
   .setBufferSize(8192)
   .setCharSequence("String")
   .setCharsetEncoder(Charset.defaultCharset().newEncoder()
     .onMalformedInput(CodingErrorAction.REPLACE)
     .onUnmappableCharacter(CodingErrorAction.REPLACE))
   .get();
 
Since:
2.13.0
See Also: