[
https://issues.apache.org/jira/browse/IO-732?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
PJ Fanning updated IO-732:
--------------------------
Description:
I was thinking of writing this and submitting it but just want to see if people
think it makes sense first.
The idea is to take AbstractByteArrayOutputStream and to replace the byte[]
with char[] (maybe called AbstractCharArrayWriter) and to create an
UnsynchronizedCharArrayWriter that extends it. Could so something similar with
UnsynchronizedByteArrayInputStream - to get an UnsynchronizedStringReader.
The nice thing about AbstractByteArrayOutputStream is the way it avoids
arraycopy. The existing commons-io StringBuilderWriter still has arraycopy
under the hood (in the java.lang.StringBuilder).
was:
I was thinking of writing this and submitting it but just want to see if people
think it makes sense first.
The idea is to take AbstractByteArrayOutputStream and to replace the byte[]
with char[] (maybe called AbstractStringWriter) and to create an
UnsynchronizedStringWriter that extends it. Could so something similar with
UnsynchronizedByteArrayInputStream - to get an UnsynchronizedStringReader.
The nice thing about AbstractByteArrayOutputStream is the way it avoids
arraycopy. The existing commons-io StringBuilderWriter still has arraycopy
under the hood (in the java.lang.StringBuilder).
> Char equivalent of UnsynchronizedByteArrayOutputStream (and InputStream)
> ------------------------------------------------------------------------
>
> Key: IO-732
> URL: https://issues.apache.org/jira/browse/IO-732
> Project: Commons IO
> Issue Type: New Feature
> Components: Streams/Writers
> Affects Versions: 2.8.0
> Reporter: PJ Fanning
> Priority: Major
>
> I was thinking of writing this and submitting it but just want to see if
> people think it makes sense first.
> The idea is to take AbstractByteArrayOutputStream and to replace the byte[]
> with char[] (maybe called AbstractCharArrayWriter) and to create an
> UnsynchronizedCharArrayWriter that extends it. Could so something similar
> with UnsynchronizedByteArrayInputStream - to get an
> UnsynchronizedStringReader.
> The nice thing about AbstractByteArrayOutputStream is the way it avoids
> arraycopy. The existing commons-io StringBuilderWriter still has arraycopy
> under the hood (in the java.lang.StringBuilder).
--
This message was sent by Atlassian Jira
(v8.3.4#803005)