File tree Expand file tree Collapse file tree
src/main/java/org/apache/commons/io/build Expand file tree Collapse file tree Original file line number Diff line number Diff line change 3939import org .apache .commons .io .IOUtils ;
4040import org .apache .commons .io .RandomAccessFileMode ;
4141import org .apache .commons .io .RandomAccessFiles ;
42+ import org .apache .commons .io .input .CharSequenceInputStream ;
4243import org .apache .commons .io .input .ReaderInputStream ;
4344import org .apache .commons .io .output .WriterOutputStream ;
4445
@@ -122,9 +123,7 @@ public CharSequence getCharSequence(final Charset charset) {
122123 @ Override
123124 public InputStream getInputStream (final OpenOption ... options ) throws IOException {
124125 // TODO Pass in a Charset? Consider if call sites actually need this.
125- return new ByteArrayInputStream (origin .toString ().getBytes (Charset .defaultCharset ()));
126- // Needs [IO-795] CharSequenceInputStream.reset() only works once.
127- // return CharSequenceInputStream.builder().setCharSequence(getCharSequence(Charset.defaultCharset())).get();
126+ return CharSequenceInputStream .builder ().setCharSequence (getCharSequence (Charset .defaultCharset ())).get ();
128127 }
129128
130129 @ Override
You can’t perform that action at this time.
0 commit comments